Skip to content

Commit de93d86

Browse files
committed
replace MRI.createGenericVirtualRegister with buildGlobalValue
Created using spr 1.3.6-beta.1
2 parents d1e4789 + bb97c99 commit de93d86

File tree

5,960 files changed

+304057
-132950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,960 files changed

+304057
-132950
lines changed

.arcconfig

Lines changed: 0 additions & 8 deletions
This file was deleted.

.arclint

Lines changed: 0 additions & 15 deletions
This file was deleted.

.ci/generate-buildkite-pipeline-premerge

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,7 @@ linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
233233

234234
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
235235
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
236-
# Temporary disable the windows job.
237-
# See https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840
238-
#windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
239-
windows_projects=""
236+
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
240237

241238
# Generate the appropriate pipeline
242239
if [[ "${linux_projects}" != "" ]]; then

.ci/monolithic-windows.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ targets="${2}"
3838

3939
echo "--- cmake"
4040
pip install -q -r ${MONOREPO_ROOT}/mlir/python/requirements.txt
41+
42+
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
43+
# on fixing a build reliability issue on the build server, please
44+
# see https://github.com/llvm/llvm-project/pull/82393 and
45+
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
46+
# for further information.
4147
cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
4248
-D LLVM_ENABLE_PROJECTS="${projects}" \
4349
-G Ninja \
@@ -49,7 +55,10 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
4955
-D COMPILER_RT_BUILD_ORC=OFF \
5056
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
5157
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
52-
-D MLIR_ENABLE_BINDINGS_PYTHON=ON
58+
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
59+
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
60+
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
61+
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
5362

5463
echo "--- ninja"
5564
# Targets are not escaped as they are passed as separate arguments.

.github/new-prs-labeler.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,56 @@ backend:X86:
822822
- llvm/lib/TargetParser/X86*
823823
- llvm/utils/TableGen/X86*
824824

825+
backend:PowerPC:
826+
- llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC*
827+
- llvm/include/llvm/BinaryFormat/XCOFF.h
828+
- llvm/include/llvm/IR/IntrinsicsPowerPC.td
829+
- llvm/lib/CodeGen/AsmPrinter/AIXException.cpp
830+
- llvm/lib/Target/PowerPC/**
831+
- llvm/test/Analysis/**/PowerPC/**
832+
- llvm/test/CodeGen/PowerPC/**
833+
- llvm/test/CodeGen/MIR/PowerPC/**
834+
- llvm/test/DebugInfo/XCOFF/**
835+
- llvm/test/DebugInfo/PowerPC/**
836+
- llvm/test/LTO/PowerPC/**
837+
- llvm/test/MC/Disassembler/PowerPC/**
838+
- llvm/test/MC/PowerPC/**
839+
- llvm/test/MC/XCOFF/**
840+
- llvm/test/Transforms/**/PowerPC/**
841+
- clang/include/clang/Basic/BuiltinsPPC.*
842+
- clang/lib/Basic/Targets/PPC.*
843+
- clang/lib/CodeGen/Targets/PPC.cpp
844+
- clang/lib/Driver/ToolChains/PPC*
845+
- clang/lib/Driver/ToolChains/AIX*
846+
- clang/lib/Driver/ToolChains/Arch/PPC.*
847+
- clang/test/CodeGen/PowerPC/**
848+
849+
backend:SystemZ:
850+
- llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ*
851+
- llvm/include/llvm/BinaryFormat/GOFF.h
852+
- llvm/include/llvm/IR/IntrinsicsSystemZ.td
853+
- llvm/lib/Target/SystemZ/**
854+
- llvm/test/Analysis/**/SystemZ/**
855+
- llvm/test/CodeGen/SystemZ/**
856+
- llvm/test/DebugInfo/SystemZ/**
857+
- llvm/test/ExecutionEngine/**/SystemZ/**
858+
- llvm/test/MC/Disassembler/SystemZ/**
859+
- llvm/test/MC/GOFF/**
860+
- llvm/test/MC/SystemZ/**
861+
- llvm/test/Transforms/**/SystemZ/**
862+
- clang/include/clang/Basic/BuiltinsSystemZ.*
863+
- clang/lib/Basic/Targets/SystemZ.*
864+
- clang/lib/CodeGen/Targets/SystemZ.cpp
865+
- clang/lib/Driver/ToolChains/ZOS*
866+
- clang/lib/Driver/ToolChains/Arch/SystemZ.*
867+
- clang/test/CodeGen/SystemZ/**
868+
825869
third-party:unittests:
826870
- third-party/unittests/**
827871

872+
third-party:benchmark:
873+
- third-party/benchmark/**
874+
828875
llvm:binary-utilities:
829876
- llvm/docs/CommandGuide/llvm-*
830877
- llvm/include/llvm/BinaryFormat/**

.github/workflows/approved-prs.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/build-ci-container.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,18 @@ jobs:
7777
cp ./.github/workflows/containers/github-action-ci/storage.conf ~/.config/containers/storage.conf
7878
podman info
7979
80+
# Download the container image into /mnt/podman rather than
81+
# $GITHUB_WORKSPACE to avoid space limitations on the default drive
82+
# and use the permissions setup for /mnt/podman.
8083
- name: Download stage1-toolchain
8184
uses: actions/download-artifact@v4
8285
with:
8386
name: stage1-toolchain
87+
path: /mnt/podman
8488

8589
- name: Load stage1-toolchain
8690
run: |
87-
podman load -i stage1-toolchain.tar
91+
podman load -i /mnt/podman/stage1-toolchain.tar
8892
8993
- name: Build Container
9094
working-directory: ./.github/workflows/containers/github-action-ci/

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828
- 'polly/docs/**'
2929
- 'flang/docs/**'
3030
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
31+
- '.github/workflows/docs.yml'
3132
pull_request:
3233
paths:
3334
- 'llvm/docs/**'
@@ -45,6 +46,7 @@ on:
4546
- 'polly/docs/**'
4647
- 'flang/docs/**'
4748
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
49+
- '.github/workflows/docs.yml'
4850

4951
jobs:
5052
check-docs-build:
@@ -162,8 +164,6 @@ jobs:
162164
TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man
163165
- name: Build Flang docs
164166
if: steps.docs-changed-subprojects.outputs.flang_any_changed == 'true'
165-
# TODO(boomanaiden154): Remove the SPHINX_WARNINGS_AS_ERRORS from the
166-
# CMake invocation once the warnings in the flang docs build are fixed.
167167
run: |
168-
cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON -DSPHINX_WARNINGS_AS_ERRORS=OFF ./llvm
169-
TZ=UTC ninja -C flang-build docs-flang-html docs-flang-man
168+
cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON ./llvm
169+
TZ=UTC ninja -C flang-build docs-flang-html

.github/workflows/llvm-project-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ jobs:
5858
lit-tests:
5959
name: Lit Tests
6060
runs-on: ${{ matrix.os }}
61+
container:
62+
image: ${{(startsWith(matrix.os, 'ubuntu') && 'ghcr.io/llvm/ci-ubuntu-22.04:latest') || null}}
63+
volumes:
64+
- /mnt/:/mnt/
6165
strategy:
6266
fail-fast: false
6367
matrix:
@@ -77,6 +81,7 @@ jobs:
7781
with:
7882
python-version: ${{ inputs.python_version }}
7983
- name: Install Ninja
84+
if: runner.os != 'Linux'
8085
uses: llvm/actions/install-ninja@main
8186
# actions/checkout deletes any existing files in the new git directory,
8287
# so this needs to either run before ccache-action or it has to use
@@ -108,8 +113,8 @@ jobs:
108113
run: |
109114
if [ "${{ runner.os }}" == "Linux" ]; then
110115
builddir="/mnt/build/"
111-
sudo mkdir -p $builddir
112-
sudo chown `whoami`:`whoami` $builddir
116+
mkdir -p $builddir
117+
extra_cmake_args="-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
113118
else
114119
builddir="$(pwd)"/build
115120
fi
@@ -123,6 +128,7 @@ jobs:
123128
-DLLDB_INCLUDE_TESTS=OFF \
124129
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
125130
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
131+
$extra_cmake_args \
126132
${{ inputs.extra_cmake_args }}
127133
ninja -C "$builddir" '${{ inputs.build_target }}'
128134

.github/workflows/release-tasks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
name: Create a New Release
2929
runs-on: ubuntu-latest
3030
needs: validate-tag
31+
3132
steps:
3233
- name: Install Dependencies
3334
run: |
@@ -40,8 +41,9 @@ jobs:
4041
- name: Create Release
4142
env:
4243
GITHUB_TOKEN: ${{ github.token }}
44+
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
4345
run: |
44-
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} create
46+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} --user ${{ github.actor }} --user-token "$USER_TOKEN" create
4547
release-documentation:
4648
name: Build and Upload Release Documentation
4749
needs:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ files needed to process intermediate representations and convert them into
1616
object files. Tools include an assembler, disassembler, bitcode analyzer, and
1717
bitcode optimizer.
1818

19-
C-like languages use the [Clang](http://clang.llvm.org/) frontend. This
19+
C-like languages use the [Clang](https://clang.llvm.org/) frontend. This
2020
component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode
2121
-- and from there into object files, using LLVM.
2222

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,10 @@ class BinaryContext {
997997
return getUniqueSectionByName(".gdb_index");
998998
}
999999

1000+
ErrorOr<BinarySection &> getDebugNamesSection() const {
1001+
return getUniqueSectionByName(".debug_names");
1002+
}
1003+
10001004
/// @}
10011005

10021006
/// Register \p TargetFunction as a fragment of \p Function if checks pass:

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,14 @@ class BinaryFunction {
20562056
/// Returns false if disassembly failed.
20572057
Error disassemble();
20582058

2059+
/// An external interface to register a branch while the function is in
2060+
/// disassembled state. Allows to make custom modifications to the
2061+
/// disassembler. E.g., a pre-CFG pass can add an instruction and register
2062+
/// a branch that will later be used during the CFG construction.
2063+
///
2064+
/// Return a label at the branch destination.
2065+
MCSymbol *registerBranch(uint64_t Src, uint64_t Dst);
2066+
20592067
Error handlePCRelOperand(MCInst &Instruction, uint64_t Address,
20602068
uint64_t Size);
20612069

bolt/include/bolt/Core/BinarySection.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,7 @@ class BinarySection {
139139
Alignment = NewAlignment;
140140
ELFType = NewELFType;
141141
ELFFlags = NewELFFlags;
142-
OutputSize = NewSize;
143-
OutputContents = StringRef(reinterpret_cast<const char *>(NewData),
144-
NewData ? NewSize : 0);
145-
IsFinalized = true;
142+
updateContents(NewData, NewSize);
146143
}
147144

148145
public:
@@ -484,9 +481,18 @@ class BinarySection {
484481
void flushPendingRelocations(raw_pwrite_stream &OS,
485482
SymbolResolverFuncTy Resolver);
486483

487-
/// Change contents of the section.
488-
void updateContents(const uint8_t *Data, size_t NewSize) {
489-
OutputContents = StringRef(reinterpret_cast<const char *>(Data), NewSize);
484+
/// Change contents of the section. Unless the section has a valid SectionID,
485+
/// the memory passed in \p NewData will be managed by the instance of
486+
/// BinarySection.
487+
void updateContents(const uint8_t *NewData, size_t NewSize) {
488+
if (getOutputData() && !hasValidSectionID() &&
489+
(!hasSectionRef() ||
490+
OutputContents.data() != getContentsOrQuit(Section).data())) {
491+
delete[] getOutputData();
492+
}
493+
494+
OutputContents = StringRef(reinterpret_cast<const char *>(NewData),
495+
NewData ? NewSize : 0);
490496
OutputSize = NewSize;
491497
IsFinalized = true;
492498
}

bolt/include/bolt/Core/DIEBuilder.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define BOLT_CORE_DIE_BUILDER_H
1717

1818
#include "bolt/Core/BinaryContext.h"
19+
#include "bolt/Core/DebugNames.h"
1920
#include "llvm/CodeGen/DIE.h"
2021
#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
2122
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
@@ -124,9 +125,10 @@ class DIEBuilder {
124125
std::vector<std::unique_ptr<DIEAbbrev>> Abbreviations;
125126
BinaryContext &BC;
126127
DWARFContext *DwarfContext{nullptr};
127-
bool IsDWO{false};
128+
DWARFUnit *SkeletonCU{nullptr};
128129
uint64_t UnitSize{0};
129130
llvm::DenseSet<uint64_t> AllProcessed;
131+
DWARF5AcceleratorTable &DebugNamesTable;
130132

131133
/// Returns current state of the DIEBuilder
132134
State &getState() { return *BuilderState.get(); }
@@ -206,8 +208,8 @@ class DIEBuilder {
206208
/// Update references once the layout is finalized.
207209
void updateReferences();
208210

209-
/// Update the Offset and Size of DIE.
210-
uint32_t computeDIEOffset(const DWARFUnit &CU, DIE &Die, uint32_t &CurOffset);
211+
/// Update the Offset and Size of DIE, populate DebugNames table.
212+
uint32_t finalizeDIEs(DWARFUnit &CU, DIE &Die, uint32_t &CurOffset);
211213

212214
void registerUnit(DWARFUnit &DU, bool NeedSort);
213215

@@ -264,8 +266,13 @@ class DIEBuilder {
264266
/// current Section.
265267
DIE *constructDIEFast(DWARFDie &DDie, DWARFUnit &U, uint32_t UnitId);
266268

269+
/// Returns true if this DIEBUilder is for DWO Unit.
270+
bool isDWO() const { return SkeletonCU != nullptr; }
271+
267272
public:
268-
DIEBuilder(BinaryContext &BC, DWARFContext *DwarfContext, bool IsDWO = false);
273+
DIEBuilder(BinaryContext &BC, DWARFContext *DwarfContext,
274+
DWARF5AcceleratorTable &DebugNamesTable,
275+
DWARFUnit *SkeletonCU = nullptr);
269276

270277
/// Returns enum to what we are currently processing.
271278
ProcessingType getCurrentProcessingState() { return getState().Type; }

0 commit comments

Comments
 (0)