Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
6400792
clang/AMDGPU: Merge toolchain subclasses (#204863)
arsenm Jul 10, 2026
375cc88
AMDGPU/GlobalISel: Switch to extended LLTs (#207419)
petar-avramovic Jul 10, 2026
9fbbe3e
[GlobalISel] Simplify computeNumSignBits fallback to KnownBits. NFC. …
jayfoad Jul 10, 2026
90f9ee6
[AMDGPU] Make `(v2i32 (trunc v2i64:$a))` legal (#207761)
jmmartinez Jul 10, 2026
b3da6d2
AArch64: Fix mishandling subregister in orr peephole (#208015)
arsenm Jul 10, 2026
f77162d
[Clang][Driver] Parallelize device cc1 jobs for offload arches
yxsamliu Jul 10, 2026
2042987
clang: Remove extra space and braces in flang check (#208714)
arsenm Jul 10, 2026
9a1fe8e
AMDGPU/GlobalISel: Switch CallLowering to extended LLTs (#208268)
petar-avramovic Jul 10, 2026
62bf9d9
[libc++] Fix shared_ptr not accepting allocators with explicit conver…
philnik777 Jul 10, 2026
016605d
[AArch64][CodeGen] Split wide active lane mask into smaller masks if …
kmclaughlin-arm Jul 10, 2026
68ee7f0
[libc++] Add benchmarks for std::is_heap and std::is_heap_until (#207…
ldionne Jul 10, 2026
d600c92
[Clang] Supports dollars in UDLs and pp-numbers (#208490)
cor3ntin Jul 10, 2026
d6ef81c
[libc++abi][NFC] Use C++11 spelling of [[noreturn]] (#207344)
philnik777 Jul 10, 2026
f665164
[clang] Don't crash in invalid #module directive (#208695)
yronglin Jul 10, 2026
f2dfbf0
[SDAG] Freeze condition in select of load fold (#208683)
nikic Jul 10, 2026
8790190
[SPIR-V] Diagnose function used as data pointer without SPV_INTEL_fun…
aobolensk Jul 10, 2026
53130f3
AMDGPU/GlobalISel: Switch legalizer custom lowering to extended LLTs …
petar-avramovic Jul 10, 2026
8544134
[compiler-rt][hexagon] Fix `__hexagon_fmadf5` overflow under directed…
SuperChamp234 Jul 10, 2026
26d1c4f
[clang][dataflow] Fix bug in transfer function of CK_BaseToDerived (#…
ymand Jul 10, 2026
3018fd7
[AArch64] Stop determineCalleeSaves double counting registers with sa…
kuroyukiasuna Jul 10, 2026
73976bc
[lldb][test] Get rid of radar references in test names (#208673)
Teemperor Jul 10, 2026
5394e2a
[lldb][test] Modernize and expand C union test (#208662)
Teemperor Jul 10, 2026
54aa96f
[lldb][test] Add a new test for long types (#208447)
Teemperor Jul 10, 2026
a465ef6
[lldb][test] Add a new test for recursive types (#208449)
Teemperor Jul 10, 2026
2c0541b
[lldb][test] Add a new test for char types (#208442)
Teemperor Jul 10, 2026
c8b02ba
[lldb][test] Expand blocks test (#208406)
Teemperor Jul 10, 2026
ff5363b
[clangd][remote] Add clangd-index-server support for cross platform i…
bwiklak Jul 10, 2026
72b8db7
[mlir][vector] add consistent stride verification to masked load/stor…
FedericoBruzzone Jul 10, 2026
b12c64e
[mlir][vector] Fix crash on untraceable masks in getCompressedMaskOp …
marquisburg Jul 10, 2026
6211a71
[X86] EltsFromConsecutiveLoads - handle trunc(wideload()) patterns (#…
as4230 Jul 10, 2026
9d1c207
[AArch64] Reassociate neg (and X, M) with an all-0/1's mask M (#207671)
guy-david Jul 10, 2026
7138e1f
[SPIR-V] Fix crash on switch with odd-width condition type (#208026)
aobolensk Jul 10, 2026
4c6646f
AMDGPU: Manually convert some tests to use subarches (#208638)
arsenm Jul 10, 2026
618ac10
AMDGPU/GlobalISel: Fix buildbot failure for unused variable (used in …
petar-avramovic Jul 10, 2026
8834939
[M68k] Update tests (#208748)
nikic Jul 10, 2026
ef3ac7a
[lldb][Windows] Support modules with long paths (#206099)
charles-zablit Jul 10, 2026
d58b056
[DebugMetadata][DwarfDebug][CodeView] Support function-local static v…
dzhidzhoev Jul 10, 2026
b4cf9c7
[MLIR][Vector] Relax shape_cast unrolling to per-reassociation-group …
Jianhui-Li Jul 10, 2026
bd97ce0
[X86] vector-compress.ll - test with x86-64 levels not raw AVX levels…
RKSimon Jul 10, 2026
0fa1ae1
AMDGPU/GlobalISel: Switch RegBankLegalize lowering to extended LLTs (…
petar-avramovic Jul 10, 2026
c5fbabb
[flang][OpenMP] Semantic checks for metadirective loop nests (#207088)
chichunchen Jul 10, 2026
23d7ed2
[Hexagon] Add S2_pstorerf{t,f}_io to isValidOffset (PR196966) (#208616)
iajbar Jul 10, 2026
114f267
[NFC][SPIR-V] Enable spirv-val checks fixed after accepting Generic c…
aobolensk Jul 10, 2026
034fd4c
[RISCV] Fix state enable CSR coverage in rv32-only-csr-names.s (#208603)
punkyc Jul 10, 2026
54b5b78
[CodeGen] Use natural type for StackMaps::ConstPool. NFC. (#208732)
jayfoad Jul 10, 2026
74cc7fd
[MC] Use DenseMap for ConstantPool::CachedEntries. NFC. (#208728)
jayfoad Jul 10, 2026
fe80624
[BOLT] Treat relr relocations like rela (#206830)
pzfl Jul 10, 2026
8ece73c
[libc++] Update the base image hash to get most recent clang-23 (#208…
yronglin Jul 10, 2026
4bf0737
[Github] Add ids container (#208498)
boomanaiden154 Jul 10, 2026
2b0a79e
[alpha.webkit.UncountedCallArgsChecker] Improve the warning text (#20…
rniwa Jul 10, 2026
01f3768
ValueTracking: Fix off by one in known frexp exponent range (#208295)
arsenm Jul 10, 2026
4cd865f
[clang] Fix constexpr placement new of arrays. (#196669)
efriedma-quic Jul 10, 2026
5ea4550
[AMDGPU] Add GFX1250 unclaused VMEM workaround (#208467)
jayfoad Jul 10, 2026
c03584a
[Hexagon] Fix wrong operand in XQFloat qf32 multiply normalization (#…
fhossein-quic Jul 10, 2026
beffef6
[lldb][docs] Try to fix forward the Sphinx automodapi doc generation …
rnk Jul 10, 2026
4d834cd
[clangd] CodeCompletion surface param names if possible (#206716)
timon-ul Jul 10, 2026
7c35673
[mlir][xegpu] Add support for 1D SLM case in vector-to-xepgu (#208276)
charithaintc Jul 10, 2026
d981ae2
Reapply "[PGO][ICP] Prevent indirect call promotion to functions with…
boomanaiden154 Jul 10, 2026
5ddad72
[lldb-mcp] Replace byte forwarding with a protocol-aware multiplexer …
JDevlieghere Jul 10, 2026
5b9d51f
[Bazel] Fixes 5ddad72 (#208792)
forking-google-bazel-bot[bot] Jul 10, 2026
cc0f756
[asan][test] Fix Posix/new_array_cookie_with_new_from_class.cpp to wo…
ian-twilightcoder Jul 10, 2026
d1dbd48
[CIR] Generalize the special member attribute into func_info and add …
SharmaRithik Jul 10, 2026
340bd05
[lldb] Simplify creating RegisterSets in DynamicRegisterInfo (#208592)
bulbazord Jul 10, 2026
93737c9
clang/AMDGPU: Forward host system includes in offload compiles (#208783)
arsenm Jul 10, 2026
8709f6f
Triple: Move OS/vendor/environment names into a def file (#208722)
arsenm Jul 10, 2026
22ca91c
[clang] more useful error message for decomposition declaration missi…
kbrav Jul 10, 2026
92d9e0d
[lldb] Improved formatting of 'register read' command. (#188049)
Rifet-c Jul 10, 2026
2396c15
[NFC][clang][dataflow] Add explanatory comment to test. (#208779)
ymand Jul 10, 2026
188b9a3
ValueTracking: Generalize known frexp exponent range to any constant …
arsenm Jul 10, 2026
9e13720
[libc++] Add MSVC's implementation of exception_ptr for Windows (#94977)
StephanTLavavej Jul 10, 2026
a8319d8
[libc++] Merge atomic-wait contention tables into a single table (#20…
ldionne Jul 10, 2026
f505ece
[flang][OpenACC] Preserve source extents in section strides (#208594)
khaki3 Jul 10, 2026
59b0935
[Clang] Treat address-of template substitution as SFINAE
yxsamliu Jul 10, 2026
fbc9c35
[docs] Rename selected libc docs to Markdown (#208354)
rnk Jul 10, 2026
71fe358
[OpenMP][Offload][AMDGPU] Fix offload tests failure after the new tri…
Kewen12 Jul 10, 2026
03ce818
[bazel] Update bazel amdgpu to use extended llt (#208797)
kevinwkt Jul 10, 2026
7bb9626
[LLVM][Verifier] Fix buffer overflow when verifying gc.statepoint (#2…
tuliom Jul 10, 2026
821afb2
[docs] Rewrite libc docs from reST to markdown (#208802)
rnk Jul 10, 2026
b33af86
[SCEV][NFC] Precommit tests for #208778 (#208784)
aleks-tmb Jul 10, 2026
a6cf9ec
[libc++] Bump base image version to most recent (#208776)
yronglin Jul 10, 2026
95a117b
AMDGPU: Migrate target id tests to use new subarch triples (#206488)
arsenm Jul 10, 2026
b29d4b2
[flang][OpenACC] Bind DO CONCURRENT construct index for nested acc lo…
ronGreenNV Jul 10, 2026
b2ae07f
[TableGen] Add MCReadAdvanceEntry to vector first, then write its fie…
topperc Jul 10, 2026
3bc47c8
[SSAF][WPA] Operator new/delete overload entities that shall retain t…
ziqingluo-90 Jul 10, 2026
15480d2
[Clang][NFC] Add two CWG2369 regression tests (#186380)
zyn0217 Jul 10, 2026
1e713b2
[Clang][Driver][NFC] Fix offload-parallel-device-cc1.cu failing in re…
kevinwkt Jul 10, 2026
9c8485a
[clang] Use a 128-byte destructive interference size on Apple AArch64…
ldionne Jul 10, 2026
2fd1419
[SystemZ][z/OS] Add options -m[no-]zos-ppa1-name to remove the functi…
sujianIBM Jul 10, 2026
a195671
AMDGPU: Migrate Analysis/Transforms tests to amdgpu subarch triple (1…
arsenm Jul 10, 2026
8292245
[Github] Make ids-check workflow use container (#208780)
boomanaiden154 Jul 10, 2026
4a71757
[AggressiveInstCombine] Support alternate deBruijn log2 table that is…
topperc Jul 10, 2026
4e5a44a
[ELF] Fix TLS GD against non-preemptible dynamic symbols in DSOs (#20…
jrtc27 Jul 10, 2026
4c5e156
[cmake] Fix VSINSTALLDIR check in FindDIASDK module (#208524)
vangthao95 Jul 10, 2026
2705f46
[libc] Implement fast date conversion algorithm of Ben Joffe (#208312)
kaladron Jul 10, 2026
ac88468
[Clang] Adjust assert in addUnsizedArray to check Base is set before …
shafik Jul 10, 2026
ddbce7b
AMDGPU: Migrate Analysis/Transforms tests to amdgpu subarch triple (2…
arsenm Jul 10, 2026
a2fc238
AMDGPU: Migrate Analysis/Transforms tests to amdgpu subarch triple (3…
arsenm Jul 10, 2026
37593bf
[compiler-rt][hexagon][test] Guard __hexagon_fmadf5 unit test with __…
kevinwkt Jul 10, 2026
98e5f18
Move the error about DIE not having an address range to the Verbose c…
jimingham Jul 10, 2026
6d3cf7f
[libcxx] Bump GitHub runner version (#208823)
boomanaiden154 Jul 10, 2026
5b1484c
clang/AMDGPU: Fix double linking opencl libs with --libclc-lib (#204865)
arsenm Jul 10, 2026
f8ea822
[Hexagon] Recompute physreg live-ins after HexagonRDFOpt (PR207422) (…
iajbar Jul 10, 2026
d1fc322
[CMake] Use minimum python version of 3.8 everywhere (#208822)
boomanaiden154 Jul 10, 2026
956777b
[Github] Bump runner version to 2.335.1 (#208824)
boomanaiden154 Jul 10, 2026
60474dc
[mlir][scf] Validate pipelining annotations in test pass (#208788)
mygitljf Jul 10, 2026
372e0ab
[clangd][remote] Fix SmallVector assertion in uriToRelativePath for W…
ArcsinX Jul 10, 2026
ff77f06
[flang][cuda] Restrict implicit use to non-cuda subprogram (#208808)
clementval Jul 10, 2026
3b3509a
[VPlan] Enable CSE of VPWidenPHIRecipe. (#207573)
fhahn Jul 10, 2026
1dbefed
[clang-doc][nfc] Remove stale FIXME (#208795)
ilovepi Jul 10, 2026
160ff82
[clang-doc][nfc] Delete commented out code (#208843)
ilovepi Jul 10, 2026
8a4a2ae
[GettingStarted] Clarify Python requirement. (#208790)
efriedma-quic Jul 10, 2026
cf51c12
[clang-doc] Update include guards in header files (#208840)
ilovepi Jul 10, 2026
d09048a
[Clang] [C++26] Expansion Statements (P1306R5) (#169680)
Sirraide Jul 10, 2026
4df4330
[lldb][test] Update whitespace of `register read` in some tests (#208…
rupprecht Jul 10, 2026
ed1e356
clang/AMDGPU: Remove driver restriction on --gpu-max-threads-per-bloc…
arsenm Jul 10, 2026
3b36c2d
AMDGPU: Migrate Analysis/Transforms tests to amdgpu subarch triple (4…
arsenm Jul 10, 2026
a8ba0ad
[NVPTX] Expand fp/int conversions involving integers wider than 64 bi…
kulst Jul 10, 2026
5a73020
[compiler-rt] [sanitizer_common] Add a testcase reproducing SIGSEGV i…
mkruskal-google Jul 10, 2026
ae51fec
merge main into amd-staging
ronlieb Jul 11, 2026
e7319f6
Revert "[DebugMetadata][DwarfDebug][CodeView] Support function-local …
ronlieb Jul 11, 2026
43a67f7
[lit] regen and unxfail
ronlieb Jul 11, 2026
2fbf9a6
[revPat] update list
ronlieb Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/build-ci-container-tooling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
test-command: 'true'
target: github-automation
context: llvm/utils/git/
- container-name: ids-checks
test-command: 'idt --help'
target: ids-checks

steps:
- name: Checkout LLVM
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/containers/github-action-ci-tooling/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,54 @@ RUN apt-get update && \
USER gha

ADD github-automation.py /usr/local/bin/

FROM docker.io/library/ubuntu:24.04@sha256:c4a8d5503dfb2a3eb8ab5f807da5bc69a85730fb49b5cfca2330194ebcc41c7b AS ids-builder
ARG LLVM_VERSION_MAJOR

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget gpg python3 python3-pip git cmake

RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION_MAJOR} main" | tee /etc/apt/sources.list.d/llvm.list && \
apt-get update && \
apt-get install -y clang-${LLVM_VERSION_MAJOR} lld-${LLVM_VERSION_MAJOR} ninja-build libclang-${LLVM_VERSION_MAJOR}-dev

COPY llvm/utils/git/requirements_formatting.txt requirements_formatting.txt
RUN pip install --require-hashes -r requirements_formatting.txt --break-system-packages && \
rm requirements_formatting.txt

RUN git clone https://github.com/compnerd/ids && cd ids && \
git checkout 6d9b77c89107743159fccaea109e8feb81959844

RUN cd ids && \
cmake -B ./build \
-S .\
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=clang-${LLVM_VERSION_MAJOR} \
-D CMAKE_CXX_COMPILER=clang++-${LLVM_VERSION_MAJOR} \
-D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-D LLVM_DIR=/usr/lib/llvm-${LLVM_VERSION_MAJOR}/lib/cmake/llvm/ \
-D Clang_DIR=/usr/lib/llvm-${LLVM_VERSION_MAJOR}/lib/cmake/clang/ \
-D FILECHECK_EXECUTABLE=$(which FileCheck-${LLVM_VERSION_MAJOR}) \
-D LIT_EXECUTABLE=$(which lit) \
-G Ninja && \
ninja -C ./build

FROM ci-container-build-tools AS ci-container-ids-checks
ARG LLVM_VERSION_MAJOR

COPY llvm/utils/git/requirements.txt requirements.txt
RUN pip install --require-hashes -r requirements.txt --break-system-packages && \
rm requirements.txt

RUN apt-get update && \
apt-get install -y libz3-4 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY --from=ids-builder /ids/build/bin/idt \
/usr/bin/idt
# Copy over the LLVM SO since getting ids to statically link against the distro
# provided libLLVM is difficult for now.
# TODO(boomanaiden154): Get static linking working and remove this.
COPY --from=ids-builder /usr/lib/llvm-${LLVM_VERSION_MAJOR}/lib/libLLVM.so.${LLVM_VERSION_MAJOR}.1 \
/usr/lib/libLLVM.so.${LLVM_VERSION_MAJOR}.1
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ RUN powershell -Command \
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" \
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
ARG RUNNER_VERSION=2.335.0
ARG RUNNER_VERSION=2.335.1
ENV RUNNER_VERSION=$RUNNER_VERSION
RUN powershell -Command \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ WORKDIR /home/gha

FROM ci-container AS ci-container-agent

ENV GITHUB_RUNNER_VERSION=2.335.0
ENV GITHUB_RUNNER_VERSION=2.335.1

RUN mkdir actions-runner && \
cd actions-runner && \
Expand Down
55 changes: 10 additions & 45 deletions .github/workflows/ids-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ jobs:
if: github.repository_owner == 'llvm'
name: Check LLVM_ABI annotations with ids
runs-on: ubuntu-24.04
container:
image: 'ghcr.io/llvm/ci-ubuntu-24.04-ids-checks:latest@sha256:c80bc0f562592a850f4460bcec6cba339fe21b29bb80763cc621fb01ed0e3883'
timeout-minutes: 20

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: compnerd/ids
path: ${{ github.workspace }}/ids
ref: 6d9b77c89107743159fccaea109e8feb81959844 # main, pinned at the --main-file landing

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
Expand All @@ -41,27 +36,13 @@ jobs:
base_sha: 'HEAD~1'
sha: 'HEAD'

- name: Install dependencies
run: |
# Pull a recent clang from LLVM's apt repo so idt's parser stays in
# sync with the C++ language features used by current LLVM source.
sudo install -d -m 0755 /etc/apt/keyrings
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key \
| sudo gpg --dearmor -o /etc/apt/keyrings/llvm.gpg
echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main" \
| sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt update
# oprofile provides opagent.h, used by llvm/ExecutionEngine/OProfileWrapper.h
sudo apt install -y clang-22 lld-22 ninja-build libclang-22-dev oprofile
pip install --require-hashes -r ${{ github.workspace }}/llvm-project/llvm/utils/git/requirements.txt
- name: Configure and build minimal LLVM for use by ids
run: |
cmake -B ${{ github.workspace }}/llvm-project/build/ \
-S ${{ github.workspace }}/llvm-project/llvm/ \
cmake -B ./llvm-project/build/ \
-S ./llvm-project/llvm/ \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=clang-22 \
-D CMAKE_CXX_COMPILER=clang++-22 \
-D CMAKE_C_COMPILER=clang \
-D CMAKE_CXX_COMPILER=clang++ \
-D LLVM_ENABLE_PROJECTS=clang \
-D LLVM_TARGETS_TO_BUILD="host" \
-D LLVM_INCLUDE_TESTS=OFF \
Expand All @@ -72,7 +53,7 @@ jobs:
# Build the generated-header prerequisites that idt needs to parse
# LLVM source.
BUILD_DIR=${{ github.workspace }}/llvm-project/build
BUILD_DIR=./llvm-project/build
ninja -C "$BUILD_DIR" \
llvm_vcsrevision_h \
intrinsics_gen omp_gen acc_gen analysis_gen target_parser_gen vt_gen \
Expand All @@ -93,33 +74,17 @@ jobs:
}')
ninja -C "$BUILD_DIR" $TABLEGEN_TARGETS
- name: Configure and build ids
run: |
cmake -B ${{ github.workspace }}/ids/build/ \
-S ${{ github.workspace }}/ids/ \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_COMPILER=clang-22 \
-D CMAKE_CXX_COMPILER=clang++-22 \
-D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
-D LLVM_DIR=/usr/lib/llvm-22/lib/cmake/llvm/ \
-D Clang_DIR=/usr/lib/llvm-22/lib/cmake/clang/ \
-D FILECHECK_EXECUTABLE=$(which FileCheck-22) \
-D LIT_EXECUTABLE=$(which lit) \
-G Ninja
ninja -C ${{ github.workspace }}/ids/build/
- name: Run ids check
env:
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
working-directory: ${{ github.workspace }}/llvm-project
run: |
echo "[]" > comments &&
python llvm/utils/git/ids-check-helper.py \
python ./llvm-project/llvm/utils/git/ids-check-helper.py \
--token ${{ secrets.GITHUB_TOKEN }} \
--issue-number $GITHUB_PR_NUMBER \
--idt-path ${{ github.workspace }}/ids/build/bin/idt \
--compile-commands ${{ github.workspace }}/llvm-project/build/compile_commands.json \
--idt-path $(which idt) \
--compile-commands ./llvm-project/build/compile_commands.json \
--start-rev HEAD~1 \
--end-rev HEAD \
--changed-files "$CHANGED_FILES" \
Expand Down
5 changes: 5 additions & 0 deletions bolt/include/bolt/Rewrite/RewriteInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ class RewriteInstance {
/// Read relocations from a given RELR section.
void readDynamicRelrRelocations(BinarySection &Section);

/// Process relative dynamic relocations targeting code. This happens in code
/// using indirect goto.
void handleRelativeDynamicRelocation(uint64_t RelOffset,
uint64_t ReferencedAddress);

/// Print relocation information.
void printRelocationInfo(const RelocationRef &Rel, StringRef SymbolName,
uint64_t SymbolAddress, uint64_t Addend,
Expand Down
51 changes: 28 additions & 23 deletions bolt/lib/Rewrite/RewriteInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2808,30 +2808,13 @@ void RewriteInstance::readDynamicRelocations(const SectionRef &Section,
// Check if this relocation targets an address within a function. This
// happens with indirect goto.
const uint64_t ReferencedAddress = SymbolAddress + Addend;
BinaryFunction *Func =
BC->getBinaryFunctionContainingAddress(ReferencedAddress);

if (Relocation::isRelative(RType) && SymbolAddress == 0) {
if (Func) {
if (!Func->isInConstantIsland(ReferencedAddress)) {
if (const uint64_t ReferenceOffset =
ReferencedAddress - Func->getAddress()) {
assert(!BC->getBinaryFunctionContainingAddress(Rel.getOffset()) &&
"Relative relocation to code only from data");
Func->registerInternalRefDataRelocation(ReferenceOffset,
Rel.getOffset());
}
} else {
BC->errs() << "BOLT-ERROR: referenced address at 0x"
<< Twine::utohexstr(ReferencedAddress)
<< " is in constant island of function " << *Func << "\n";
exit(1);
}
if (Relocation::isRelative(RType)) {
if (SymbolAddress != 0) {
BC->errs() << "BOLT-ERROR: symbol address non zero for RELATIVE "
"relocation type\n";
exit(1);
}
} else if (Relocation::isRelative(RType) && SymbolAddress != 0) {
BC->errs() << "BOLT-ERROR: symbol address non zero for RELATIVE "
"relocation type\n";
exit(1);
handleRelativeDynamicRelocation(Rel.getOffset(), ReferencedAddress);
}

BC->addDynamicRelocation(Rel.getOffset(), Symbol, RType, Addend);
Expand Down Expand Up @@ -2864,6 +2847,7 @@ void RewriteInstance::readDynamicRelrRelocations(BinarySection &Section) {
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: R_*_RELATIVE relocation at 0x"
<< Twine::utohexstr(Address) << " to 0x"
<< Twine::utohexstr(Addend) << '\n';);
handleRelativeDynamicRelocation(Address, Addend);
BC->addDynamicRelocation(Address, nullptr, RType, Addend, /*Value=*/0,
/*IsRELR=*/true);
};
Expand Down Expand Up @@ -2891,6 +2875,27 @@ void RewriteInstance::readDynamicRelrRelocations(BinarySection &Section) {
}
}

void RewriteInstance::handleRelativeDynamicRelocation(
uint64_t RelOffset, uint64_t ReferencedAddress) {
BinaryFunction *Func =
BC->getBinaryFunctionContainingAddress(ReferencedAddress);
if (!Func)
return;

if (Func->isInConstantIsland(ReferencedAddress)) {
BC->errs() << "BOLT-ERROR: referenced address at 0x"
<< Twine::utohexstr(ReferencedAddress)
<< " is in constant island of function " << *Func << "\n";
exit(1);
}

if (const uint64_t ReferenceOffset = ReferencedAddress - Func->getAddress()) {
assert(!BC->getBinaryFunctionContainingAddress(RelOffset) &&
"Relative relocation to code only from data");
Func->registerInternalRefDataRelocation(ReferenceOffset, RelOffset);
}
}

void RewriteInstance::printRelocationInfo(const RelocationRef &Rel,
StringRef SymbolName,
uint64_t SymbolAddress,
Expand Down
7 changes: 7 additions & 0 deletions bolt/test/X86/indirect-goto.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ RUN: llvm-bolt %t.pie -o %t.pie.null --relocs=1 --print-cfg --print-only=main \
RUN: --strict \
RUN: 2>&1 | FileCheck %s

## Check indirect goto works in binaries linked with relr
RUN: %clang %cflags -fPIE -pie %S/../Inputs/indirect_goto.c -o %t.relr \
RUN: -Wl,-z,pack-relative-relocs -Wl,-q
RUN: llvm-bolt %t.relr -o %t.relr.null --relocs=1 --print-cfg --print-only=main \
RUN: --strict \
RUN: 2>&1 | FileCheck %s

## Check that all possible destinations are included as successors.
CHECK: jmpq *%rax # UNKNOWN CONTROL FLOW
CHECK: Successors: .Ltmp0, .Ltmp1, .Ltmp2
1 change: 0 additions & 1 deletion clang-tools-extra/clang-doc/BitcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ void ClangDocBitcodeWriter::emitBlock(const MemberTypeInfo &T) {
emitRecord(T.IsStatic, MEMBER_TYPE_IS_STATIC);
emitRecord(T.IsBuiltIn, MEMBER_TYPE_IS_BUILTIN);
emitRecord(T.IsTemplate, MEMBER_TYPE_IS_TEMPLATE);
// emitRecord(T.IsTemplate, MEMBER_TYPE_IS_TEMPLATE);
for (const auto &CI : T.Description)
emitBlock(*CI.Ptr);
}
Expand Down
5 changes: 0 additions & 5 deletions clang-tools-extra/clang-doc/Representation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,6 @@ void NamespaceInfo::merge(NamespaceInfo &&Other) {
RecordInfo::RecordInfo(SymbolID USR, StringRef Name, StringRef Path)
: SymbolInfo(InfoType::IT_record, USR, Name, Path) {}

// FIXME: This constructor is currently unsafe for cross-arena copies of
// populated records. Because a default copy of ScopeChildren will shallow-copy
// the intrusive pointers, leading to a use-after-free when the TransientArena
// is reset. Subsequent patches will address this by deep-copying children
// individually via reduceChildren.
RecordInfo::RecordInfo(const RecordInfo &Other, llvm::BumpPtrAllocator &Arena)
: SymbolInfo(Other, Arena), TagType(Other.TagType),
IsTypeDef(Other.IsTypeDef) {
Expand Down
6 changes: 3 additions & 3 deletions clang-tools-extra/clang-doc/support/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
/// such as creating directories and writing output files.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_SUPPORT_FILE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_SUPPORT_FILE_H

#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Error.h"
Expand All @@ -28,4 +28,4 @@ llvm::SmallString<128> computeRelativePath(llvm::StringRef Destination,
} // namespace doc
} // namespace clang

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_SUPPORT_FILE_H
6 changes: 3 additions & 3 deletions clang-tools-extra/clang-doc/support/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
/// data model.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_FILE_H
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_SUPPORT_UTILS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_SUPPORT_UTILS_H

#include "../Representation.h"
#include "llvm/ADT/SmallString.h"
Expand All @@ -33,4 +33,4 @@ void getHtmlFiles(llvm::StringRef AssetsPath,

void getMdFiles(llvm::StringRef AssetsPath, clang::doc::ClangDocContext &CDCtx);

#endif
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_DOC_SUPPORT_UTILS_H
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ Marshaller::Marshaller(llvm::StringRef RemoteIndexRoot,
: Strings(Arena) {
llvm::StringRef PosixSeparator = get_separator(Style::posix);
if (!RemoteIndexRoot.empty()) {
assert(is_absolute(RemoteIndexRoot));
assert(is_absolute(RemoteIndexRoot, Style::posix) ||
is_absolute(RemoteIndexRoot, Style::windows));
this->RemoteIndexRoot = convert_to_slash(RemoteIndexRoot, Style::windows);
llvm::StringRef Path(this->RemoteIndexRoot);
if (!is_separator(this->RemoteIndexRoot.back(), Style::posix))
this->RemoteIndexRoot += PosixSeparator;
}
if (!LocalIndexRoot.empty()) {
assert(is_absolute(LocalIndexRoot));
assert(is_absolute(LocalIndexRoot, Style::posix) ||
is_absolute(LocalIndexRoot, Style::windows));
this->LocalIndexRoot = convert_to_slash(LocalIndexRoot, Style::windows);
llvm::StringRef Path(this->LocalIndexRoot);
if (!is_separator(this->LocalIndexRoot.back(), Style::posix))
Expand Down Expand Up @@ -395,7 +397,7 @@ llvm::Expected<std::string> Marshaller::uriToRelativePath(llvm::StringRef URI) {
llvm::StringRef Path(Result);
// Check for Windows paths (URI=file:///X:/path => Body=/X:/path)
if (is_absolute(Path.substr(1), Style::windows))
Result = Path.drop_front();
Result = Path.drop_front().str();
if (!replace_path_prefix(Result, RemoteIndexRoot, ""))
return error("File path '{0}' doesn't start with '{1}'.", Result.str(),
RemoteIndexRoot);
Expand Down
4 changes: 3 additions & 1 deletion clang-tools-extra/clangd/index/remote/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,9 @@ int main(int argc, char *argv[]) {
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
llvm::sys::SetInterruptFunction(&clang::clangd::requestShutdown);

if (!llvm::sys::path::is_absolute(IndexRoot)) {
if (!llvm::sys::path::is_absolute(IndexRoot, llvm::sys::path::Style::posix) &&
!llvm::sys::path::is_absolute(IndexRoot,
llvm::sys::path::Style::windows)) {
llvm::errs() << "Index root should be an absolute path.\n";
return -1;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Verify that clangd-index-server accepts Windows-style absolute paths as
# project root, allowing the server to run on Linux with a Windows-built index.
# "C:/project" is absolute in Windows style but not POSIX style.
# REQUIRES: clangd-remote-index
# RUN: not clangd-index-server --server-address=localhost:0 %t.idx "C:\\project" 2>&1 | FileCheck %s
# The server should pass the path validation and fail later on missing index.
# CHECK-NOT: Index root should be an absolute path
# CHECK: does not exist
Loading
Loading