Skip to content

Commit 8fe166f

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW42)
LLVM: llvm/llvm-project@8505c3b15bfc SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@d009cd4
2 parents b6fc884 + 73adcec commit 8fe166f

File tree

1,944 files changed

+90494
-29106
lines changed

Some content is hidden

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

1,944 files changed

+90494
-29106
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ set -eu
2121
set -o pipefail
2222

2323
# Environment variables script works with:
24+
25+
# Fetch origin/main to have an up to date merge base for main...HEAD diff.
26+
git fetch origin main:main
2427
# List of files affected by this commit
25-
: ${MODIFIED_FILES:=$(git diff --name-only HEAD~1)}
28+
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
2629
# Filter rules for generic windows tests
2730
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
2831
# Filter rules for generic linux tests

.github/new-prs-labeler.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,3 +794,35 @@ llvm:binary-utilities:
794794
- llvm/tools/llvm-size/**
795795
- llvm/tools/llvm-strings/**
796796
- llvm/tools/llvm-symbolizer/**
797+
798+
clang:openmp:
799+
- clang/include/clang/Basic/OpenMP*
800+
- clang/include/clang/AST/OpenMPClause.h
801+
- clang/include/clang/AST/DeclOpenMP.h
802+
- clang/include/clang/AST/ExprOpenMP.h
803+
- clang/include/clang/AST/StmtOpenMP.h
804+
- clang/lib/AST/DeclOpenMP.cpp
805+
- clang/lib/AST/OpenMPClause.cpp
806+
- clang/lib/AST/StmtOpenMP.cpp
807+
- clang/lib/Headers/openmp_wrappers/**
808+
- clang/lib/Parse/ParseOpenMP.cpp
809+
- clang/lib/Basic/OpenMPKinds.cpp
810+
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
811+
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.h
812+
- clang/lib/CodeGen/CgStmtOpenMP.cpp
813+
- clang/lib/CodeGen/CGOpenMP*
814+
- clang/lib/Sema/SemaOpenMP.cpp
815+
- clang/test/OpenMP/**
816+
- clang/test/AST/ast-dump-openmp-*
817+
- llvm/lib/Frontend/OpenMP/**
818+
- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
819+
- llvm/include/llvm/Frontend/OpenMP/**
820+
- llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
821+
- llvm/unittests/Frontend/OpenMP*
822+
- llvm/test/Transforms/OpenMP/**
823+
824+
openmp:libomp:
825+
- any: ['openmp/**', '!openmp/libomptarget/**']
826+
827+
openmp:libomptarget:
828+
- any: ['openmp/**', '!openmp/runtime/**']

.github/workflows/docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# LLVM Documentation CI
2+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3+
# See https://llvm.org/LICENSE.txt for license information.
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
name: "Test documentation build"
7+
8+
permissions:
9+
contents: read
10+
11+
on:
12+
push:
13+
branches:
14+
- 'main'
15+
paths:
16+
- 'llvm/docs/**'
17+
- 'clang/docs/**'
18+
pull_request:
19+
paths:
20+
- 'llvm/docs/**'
21+
- 'clang/docs/**'
22+
23+
jobs:
24+
check-docs-build:
25+
name: "Test documentation build"
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Fetch LLVM sources
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
- name: Setup Python env
33+
uses: actions/setup-python@v4
34+
with:
35+
python-version: '3.11'
36+
cache: 'pip'
37+
cache-dependency-path: 'llvm/docs/requirements.txt'
38+
- name: Install python dependencies
39+
run: pip install -r llvm/docs/requirements.txt
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y cmake ninja-build
44+
- name: Get subprojects that have doc changes
45+
id: docs-changed-subprojects
46+
uses: tj-actions/changed-files@v39
47+
with:
48+
files_yaml: |
49+
llvm:
50+
- 'llvm/docs/**'
51+
clang:
52+
- 'clang/docs/**'
53+
- name: Build LLVM docs
54+
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
55+
run: |
56+
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON -DSPHINX_OUTPUT_HTML=ON -DSPHINX_OUTPUT_MAN=ON ./llvm
57+
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
58+
- name: Build Clang docs
59+
if: steps.docs-changed-subprojects.outputs.clang_any_changed == 'true'
60+
run: |
61+
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON -DSPHINX_OUTPUT_HTML=ON -DSPHINX_OUTPUT_MAN=ON ./llvm
62+
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
63+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Check libc++ generated files"
2+
on:
3+
pull_request:
4+
paths:
5+
- 'libcxx/**'
6+
7+
jobs:
8+
check_generated_files:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Fetch LLVM sources
12+
uses: actions/checkout@v4
13+
14+
- name: Install dependencies
15+
uses: aminya/setup-cpp@v1
16+
with:
17+
clangformat: 17.0.1
18+
ninja: true
19+
20+
- name: Check generated files
21+
run: libcxx/utils/ci/run-buildbot check-generated-output

.github/workflows/release-tasks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,18 @@ jobs:
104104
run: |
105105
cd llvm/utils/lit
106106
# Remove 'dev' suffix from lit version.
107-
sed -i "s/ + 'dev'//g" lit/__init__.py
107+
sed -i 's/ + "dev"//g' lit/__init__.py
108108
python3 setup.py sdist
109109
110110
- name: Upload lit to test.pypi.org
111111
uses: pypa/gh-action-pypi-publish@release/v1
112112
with:
113113
password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
114114
repository-url: https://test.pypi.org/legacy/
115+
packages-dir: llvm/utils/lit/dist/
115116

116117
- name: Upload lit to pypi.org
117118
uses: pypa/gh-action-pypi-publish@release/v1
118119
with:
119120
password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
121+
packages-dir: llvm/utils/lit/dist/

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ class BinaryFunction {
192192
static constexpr uint64_t COUNT_NO_PROFILE =
193193
BinaryBasicBlock::COUNT_NO_PROFILE;
194194

195-
/// We have to use at least 2-byte alignment for functions because of C++ ABI.
196-
static constexpr unsigned MinAlign = 2;
197-
198195
static const char TimerGroupName[];
199196
static const char TimerGroupDesc[];
200197

@@ -1720,8 +1717,24 @@ class BinaryFunction {
17201717
return *this;
17211718
}
17221719

1723-
Align getAlign() const { return Align(Alignment); }
1720+
uint16_t getMinAlignment() const {
1721+
// Align data in code BFs minimum to CI alignment
1722+
if (!size() && hasIslandsInfo())
1723+
return getConstantIslandAlignment();
1724+
1725+
// Minimal code alignment on AArch64 and RISCV is 4
1726+
if (BC.isAArch64() || BC.isRISCV())
1727+
return 4;
1728+
1729+
// We have to use at least 2-byte alignment for functions because
1730+
// of C++ ABI.
1731+
return 2;
1732+
}
1733+
1734+
Align getMinAlign() const { return Align(getMinAlignment()); }
1735+
17241736
uint16_t getAlignment() const { return Alignment; }
1737+
Align getAlign() const { return Align(getAlignment()); }
17251738

17261739
BinaryFunction &setMaxAlignmentBytes(uint16_t MaxAlignBytes) {
17271740
MaxAlignmentBytes = MaxAlignBytes;

bolt/lib/Core/BinaryContext.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,10 @@ MarkerSymType BinaryContext::getMarkerType(const SymbolRef &Symbol) const {
18031803
if (*NameOrError == "$x" || NameOrError->startswith("$x."))
18041804
return MarkerSymType::CODE;
18051805

1806+
// $x<ISA>
1807+
if (isRISCV() && NameOrError->startswith("$x"))
1808+
return MarkerSymType::CODE;
1809+
18061810
if (*NameOrError == "$d" || NameOrError->startswith("$d."))
18071811
return MarkerSymType::DATA;
18081812

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
309309
// tentative layout.
310310
Section->ensureMinAlignment(Align(opts::AlignFunctions));
311311

312-
Streamer.emitCodeAlignment(Align(BinaryFunction::MinAlign), &*BC.STI);
312+
Streamer.emitCodeAlignment(Function.getMinAlign(), &*BC.STI);
313313
uint16_t MaxAlignBytes = FF.isSplitFragment()
314314
? Function.getMaxColdAlignmentBytes()
315315
: Function.getMaxAlignmentBytes();

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ bool shouldPrint(const BinaryFunction &Function) {
164164
namespace llvm {
165165
namespace bolt {
166166

167-
constexpr unsigned BinaryFunction::MinAlign;
168-
169167
template <typename R> static bool emptyRange(const R &Range) {
170168
return Range.begin() == Range.end();
171169
}

0 commit comments

Comments
 (0)