Skip to content

Commit 3e7f66b

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW49)
LLVM: llvm/llvm-project@6b4812f SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@aeeaf6c
2 parents 36fb61c + 8e53f09 commit 3e7f66b

File tree

2,736 files changed

+158121
-67997
lines changed

Some content is hidden

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

2,736 files changed

+158121
-67997
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81
6464

6565
# [libc++][NFC] clang-format <shared_mutex>
6666
2d7eb9c9ea1a146412a83603d5c0c6339a5d8284
67+
68+
# [libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI
69+
4c198542226223f6a5c5511a1f89b37d15ee10b9

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ env:
5050
jobs:
5151
stage1:
5252
if: github.repository_owner == 'llvm'
53-
runs-on:
54-
group: libcxx-runners-8
53+
runs-on: libcxx-runners-8-set
5554
continue-on-error: false
5655
strategy:
57-
fail-fast: true
56+
fail-fast: false
5857
matrix:
5958
config: [
6059
'generic-cxx03',
@@ -89,12 +88,11 @@ jobs:
8988
**/crash_diagnostics/*
9089
stage2:
9190
if: github.repository_owner == 'llvm'
92-
runs-on:
93-
group: libcxx-runners-8
91+
runs-on: libcxx-runners-8-set
9492
needs: [ stage1 ]
9593
continue-on-error: false
9694
strategy:
97-
fail-fast: true
95+
fail-fast: false
9896
matrix:
9997
config: [
10098
'generic-cxx11',
@@ -169,27 +167,26 @@ jobs:
169167
'benchmarks',
170168
'bootstrapping-build'
171169
]
172-
machine: [ 'libcxx-runners-8' ]
170+
machine: [ 'libcxx-runners-8-set' ]
173171
std_modules: [ 'OFF' ]
174172
include:
175173
- config: 'generic-cxx26'
176-
machine: libcxx-runners-8
174+
machine: libcxx-runners-8-set
177175
std_modules: 'ON'
178176
- config: 'generic-asan'
179-
machine: libcxx-runners-8
177+
machine: libcxx-runners-8-set
180178
std_modules: 'OFF'
181179
- config: 'generic-tsan'
182-
machine: libcxx-runners-8
180+
machine: libcxx-runners-8-set
183181
std_modules: 'OFF'
184182
- config: 'generic-ubsan'
185-
machine: libcxx-runners-8
183+
machine: libcxx-runners-8-set
186184
std_modules: 'OFF'
187185
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
188186
- config: 'generic-msan'
189-
machine: libcxx-runners-32
187+
machine: libcxx-runners-32-set
190188
std_modules: 'OFF'
191-
runs-on:
192-
group: ${{ matrix.machine }}
189+
runs-on: ${{ matrix.machine }}
193190
steps:
194191
- uses: actions/checkout@v4
195192
- name: ${{ matrix.config }}

.github/workflows/new-prs.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,43 @@ on:
1515
- synchronize
1616

1717
jobs:
18-
automate-prs-labels:
18+
greeter:
19+
runs-on: ubuntu-latest
1920
permissions:
2021
pull-requests: write
22+
# Only comment on PRs that have been opened for the first time, by someone
23+
# new to LLVM or to GitHub as a whole.
24+
if: >-
25+
(github.repository == 'llvm/llvm-project') &&
26+
(github.event.action == 'opened') &&
27+
(github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' ||
28+
github.event.pull_request.author_association == 'FIRST_TIMER')
29+
steps:
30+
- name: Setup Automation Script
31+
run: |
32+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/github-automation.py
33+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/requirements.txt
34+
chmod a+x github-automation.py
35+
pip install -r requirements.txt
36+
37+
- name: Greet Author
38+
run: |
39+
./github-automation.py \
40+
--token '${{ secrets.GITHUB_TOKEN }}' \
41+
pr-greeter \
42+
--issue-number "${{ github.event.pull_request.number }}"
43+
44+
automate-prs-labels:
45+
# Greet first so that only the author gets that notification.
46+
needs: greeter
2147
runs-on: ubuntu-latest
2248
# Ignore PRs with more than 10 commits. Pull requests with a lot of
2349
# commits tend to be accidents usually when someone made a mistake while trying
2450
# to rebase. We want to ignore these pull requests to avoid excessive
2551
# notifications.
52+
# always() means that even if greeter is skipped, this job will run.
2653
if: >
27-
github.repository == 'llvm/llvm-project' &&
54+
always() && github.repository == 'llvm/llvm-project' &&
2855
github.event.pull_request.draft == false &&
2956
github.event.pull_request.commits < 10
3057
steps:

.mailmap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
2626
27+
2728
2829
2930
@@ -42,3 +43,6 @@ Med Ismail Bennani <[email protected]> <[email protected]>
4243
Ramkumar Ramachandra <[email protected]> <[email protected]>
4344
Saleem Abdulrasool <[email protected]>
4445
46+
Wang Pengcheng <[email protected]>
47+
48+

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,11 @@ class BinaryContext {
614614
/// Indicates if the function ordering of the binary is finalized.
615615
bool HasFinalizedFunctionOrder{false};
616616

617+
/// Indicates if a separate .text.warm section is needed that contains
618+
/// function fragments with
619+
/// FunctionFragment::getFragmentNum() == FragmentNum::warm()
620+
bool HasWarmSection{false};
621+
617622
/// Is the binary always loaded at a fixed address. Shared objects and
618623
/// position-independent executables (PIEs) are examples of binaries that
619624
/// will have HasFixedLoadAddress set to false.
@@ -930,6 +935,8 @@ class BinaryContext {
930935

931936
const char *getMainCodeSectionName() const { return ".text"; }
932937

938+
const char *getWarmCodeSectionName() const { return ".text.warm"; }
939+
933940
const char *getColdCodeSectionName() const { return ".text.cold"; }
934941

935942
const char *getHotTextMoverSectionName() const { return ".text.mover"; }

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,8 @@ class BinaryFunction {
12361236
return SmallString<32>(CodeSectionName);
12371237
if (Fragment == FragmentNum::cold())
12381238
return SmallString<32>(ColdCodeSectionName);
1239+
if (BC.HasWarmSection && Fragment == FragmentNum::warm())
1240+
return SmallString<32>(BC.getWarmCodeSectionName());
12391241
return formatv("{0}.{1}", ColdCodeSectionName, Fragment.get() - 1);
12401242
}
12411243

bolt/include/bolt/Core/FunctionLayout.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class FragmentNum {
6363

6464
static constexpr FragmentNum main() { return FragmentNum(0); }
6565
static constexpr FragmentNum cold() { return FragmentNum(1); }
66+
static constexpr FragmentNum warm() { return FragmentNum(2); }
6667
};
6768

6869
/// A freestanding subset of contiguous blocks of a function.

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,10 @@ void BinaryEmitter::emitFunctions() {
287287

288288
// Mark the end of hot text.
289289
if (opts::HotText) {
290-
Streamer.switchSection(BC.getTextSection());
290+
if (BC.HasWarmSection)
291+
Streamer.switchSection(BC.getCodeSection(BC.getWarmCodeSectionName()));
292+
else
293+
Streamer.switchSection(BC.getTextSection());
291294
Streamer.emitLabel(BC.getHotTextEndSymbol());
292295
}
293296
}

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,9 +3352,9 @@ void BinaryFunction::fixBranches() {
33523352
// We are going to generate two branches. Check if their targets are in
33533353
// the same fragment as this block. If only one target is in the same
33543354
// fragment, make it the destination of the conditional branch. There
3355-
// is a chance it will be a short branch which takes 5 bytes fewer than
3355+
// is a chance it will be a short branch which takes 4 bytes fewer than
33563356
// a long conditional branch. For unconditional branch, the difference
3357-
// is 4 bytes.
3357+
// is 3 bytes.
33583358
if (BB->getFragmentNum() != TSuccessor->getFragmentNum() &&
33593359
BB->getFragmentNum() == FSuccessor->getFragmentNum())
33603360
swapSuccessors();

bolt/lib/Core/FunctionLayout.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,6 @@ bool FunctionLayout::update(const ArrayRef<BinaryBasicBlock *> NewLayout) {
188188
for (BinaryBasicBlock *const BB : NewLayout) {
189189
FragmentNum Num = BB->getFragmentNum();
190190

191-
assert(Num >= Fragments.back()->getFragmentNum() &&
192-
"Blocks must be arranged such that fragments are monotonically "
193-
"increasing.");
194-
195191
// Add empty fragments if necessary
196192
while (Fragments.back()->getFragmentNum() < Num)
197193
addFragment();

0 commit comments

Comments
 (0)