Skip to content

Commit 9741bdc

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW04)
LLVM: llvm/llvm-project@cd7ea4e SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@8c357de
2 parents 80c7bcf + e2a8b3e commit 9741bdc

File tree

3,136 files changed

+123890
-44183
lines changed

Some content is hidden

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

3,136 files changed

+123890
-44183
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#
1111
# This file generates a Buildkite pipeline that triggers the various CI jobs for
12-
# the LLVM project during pre-commit CI (each time a Phabricator diff is uploaded).
12+
# the LLVM project during pre-commit CI.
1313
#
1414
# See https://buildkite.com/docs/agent/v3/cli-pipeline#pipeline-format.
1515
#
@@ -30,8 +30,6 @@ git fetch origin main:main
3030
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
3131
# Filter rules for generic linux tests
3232
: ${LINUX_AGENTS:='{"queue": "linux"}'}
33-
# Service agents, for interacting with Phabricator.
34-
: ${SERVICE_AGENTS:='{"queue": "service"}'}
3533
# Set by buildkite
3634
: ${BUILDKITE_COMMIT:=}
3735
: ${BUILDKITE_BRANCH:=}
@@ -284,28 +282,3 @@ if [[ "${windows_projects}" != "" ]]; then
284282
- 'bash .ci/monolithic-windows.sh "$(echo ${windows_projects} | tr ' ' ';')" "$(echo ${windows_check_targets})"'
285283
EOF
286284
fi
287-
288-
# If build was triggered from a Phabricator review - send an update back.
289-
if [[ -n "${ph_target_phid:-}" ]]; then
290-
cat << EOF
291-
- continue_on_failure: true
292-
wait: '~'
293-
- label: ':phabricator: update build status on Phabricator'
294-
agents: ${SERVICE_AGENTS}
295-
artifact_paths:
296-
- 'artifacts/**/*'
297-
commands:
298-
- export SRC=\$\${BUILDKITE_BUILD_PATH}/llvm-premerge-checks
299-
- rm -rf \$\${SRC}
300-
- git clone --depth 1 https://github.com/google/llvm-premerge-checks.git "\$\${SRC}"
301-
- cd \$\${SRC}
302-
- git fetch origin "main":x
303-
- git checkout x
304-
- echo "llvm-premerge-checks commit"
305-
- git rev-parse HEAD
306-
- pip install -q -r \$\${SRC}/scripts/requirements.txt
307-
- cd "\$\$BUILDKITE_BUILD_CHECKOUT_PATH"
308-
- \$\${SRC}/scripts/summary.py
309-
timeout_in_minutes: 10
310-
EOF
311-
fi

.ci/generate-buildkite-pipeline-scheduled

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

.github/new-prs-labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ clang-tidy:
308308
- clang-tools-extra/docs/clang-tidy/**
309309
- clang-tools-extra/test/clang-tidy/**
310310

311+
clang-tools-extra:
312+
- clang-tools-extra/**
313+
311314
tools:llvm-mca:
312315
- llvm/tools/llvm-mca/**
313316
- llvm/include/llvm/MCA/**
@@ -591,13 +594,16 @@ mlgo:
591594
- llvm/include/llvm/Analysis/*Runner.h
592595
- llvm/unittests/Analysis/ML*
593596
- llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
597+
- llvm/lib/Analysis/TrainingLogger.cpp
594598
- llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
599+
- llvm/include/llvm/Analysis/Utils/TrainingLogger.h
595600
- llvm/test/Analysis/FunctionPropertiesAnalysis/*
596601
- llvm/unittests/Analysis/FunctionPropertiesAnalysisTest.cpp
597602
- llvm/test/Transforms/inline/ML/**
598603
- llvm/lib/CodeGen/ML*
599604
- llvm/unittests/CodeGen/ML*
600605
- llvm/test/CodeGen/MLRegAlloc/**
606+
- llvm/utils/mlgo-utils/*
601607

602608
tools:llvm-exegesis:
603609
- llvm/tools/llvm-exegesis/**

.github/workflows/issue-release-workflow.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
backport-commits:
3434
name: Backport Commits
3535
runs-on: ubuntu-latest
36+
permissions:
37+
issues: write
3638
if: >-
3739
(github.repository == 'llvm/llvm-project') &&
3840
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
@@ -58,15 +60,18 @@ jobs:
5860
printf "%s" "$COMMENT_BODY" |
5961
./llvm/utils/git/github-automation.py \
6062
--repo "$GITHUB_REPOSITORY" \
61-
--token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
63+
--token ${{ github.token }} \
6264
release-workflow \
65+
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
6366
--issue-number ${{ github.event.issue.number }} \
64-
--phab-token ${{ secrets.RELEASE_WORKFLOW_PHAB_TOKEN }} \
6567
auto
6668
6769
create-pull-request:
6870
name: Create Pull Request
6971
runs-on: ubuntu-latest
72+
permissions:
73+
issues: write
74+
pull-requests: write
7075
if: >-
7176
(github.repository == 'llvm/llvm-project') &&
7277
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
@@ -87,8 +92,8 @@ jobs:
8792
printf "%s" "$COMMENT_BODY" |
8893
./llvm/utils/git/github-automation.py \
8994
--repo "$GITHUB_REPOSITORY" \
90-
--token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
95+
--token ${{ github.token }} \
9196
release-workflow \
97+
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
9298
--issue-number ${{ github.event.issue.number }} \
93-
--phab-token ${{ secrets.RELEASE_WORKFLOW_PHAB_TOKEN }} \
9499
auto

.github/workflows/issue-subscriber.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- name: Setup Automation Script
2323
working-directory: ./llvm/utils/git/
2424
run: |
25-
chmod a+x github-automation.py
2625
pip install -r requirements.txt
2726
2827
- name: Update watchers
@@ -31,7 +30,7 @@ jobs:
3130
env:
3231
LABEL_NAME: ${{ github.event.label.name }}
3332
run: |
34-
./github-automation.py \
33+
python3 ./github-automation.py \
3534
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
3635
issue-subscriber \
3736
--issue-number '${{ github.event.issue.number }}' \

.github/workflows/libclang-python-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ permissions:
66
on:
77
workflow_dispatch:
88
push:
9+
branches:
10+
- 'main'
911
paths:
1012
- 'clang/bindings/python/**'
1113
- 'clang/tools/libclang/**'
@@ -30,6 +32,7 @@ jobs:
3032
check-clang-python:
3133
# Build libclang and then run the libclang Python binding's unit tests.
3234
name: Build and run Python unit tests
35+
if: github.repository == 'llvm/llvm-project'
3336
strategy:
3437
fail-fast: false
3538
matrix:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ on:
2323
- 'cmake/**'
2424
- '.github/workflows/libcxx-build-and-test.yaml'
2525
schedule:
26-
# Run nightly at 8 AM UTC (or roughly 3 AM eastern)
27-
- cron: '0 3 * * *'
26+
# Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern)
27+
- cron: '0 8 * * *'
2828

2929
permissions:
3030
contents: read # Default everything to read-only

.github/workflows/new-prs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ jobs:
4343
- name: Setup Automation Script
4444
working-directory: ./llvm/utils/git/
4545
run: |
46-
chmod a+x github-automation.py
4746
pip install -r requirements.txt
4847
4948
- name: Greet Author
5049
working-directory: ./llvm/utils/git/
5150
run: |
52-
./github-automation.py \
51+
python3 ./github-automation.py \
5352
--token '${{ secrets.GITHUB_TOKEN }}' \
5453
pr-greeter \
5554
--issue-number "${{ github.event.pull_request.number }}"

.github/workflows/pr-subscriber.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ jobs:
2222
- name: Setup Automation Script
2323
working-directory: ./llvm/utils/git/
2424
run: |
25-
chmod a+x github-automation.py
2625
pip install -r requirements.txt
2726
2827
- name: Update watchers
2928
working-directory: ./llvm/utils/git/
3029
run: |
31-
./github-automation.py \
30+
python3 ./github-automation.py \
3231
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
3332
pr-subscriber \
3433
--issue-number "${{ github.event.number }}" \

bolt/docs/BAT.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,15 @@ Header:
6969

7070
The header is followed by Functions table with `NumFuncs` entries.
7171
Output binary addresses are delta encoded, meaning that only the difference with
72-
the previous output address is stored. Addresses implicitly start at zero.
72+
the last previous output address is stored. Addresses implicitly start at zero.
73+
Output addresses are continuous through function start addresses and function
74+
internal offsets, and between hot and cold fragments, to better spread deltas
75+
and save space.
76+
7377
Hot indices are delta encoded, implicitly starting at zero.
7478
| Entry | Encoding | Description |
7579
| ------ | ------| ----------- |
76-
| `Address` | Delta, ULEB128 | Function address in the output binary |
80+
| `Address` | Continuous, Delta, ULEB128 | Function address in the output binary |
7781
| `HotIndex` | Delta, ULEB128 | Cold functions only: index of corresponding hot function in hot functions table |
7882
| `NumEntries` | ULEB128 | Number of address translation entries for a function |
7983

@@ -82,10 +86,10 @@ function.
8286

8387
### Address translation table
8488
Delta encoding means that only the difference with the previous corresponding
85-
entry is encoded. Offsets implicitly start at zero.
89+
entry is encoded. Input offsets implicitly start at zero.
8690
| Entry | Encoding | Description |
8791
| ------ | ------| ----------- |
88-
| `OutputOffset` | Delta, ULEB128 | Function offset in output binary |
92+
| `OutputOffset` | Continuous, Delta, ULEB128 | Function offset in output binary |
8993
| `InputOffset` | Delta, SLEB128 | Function offset in input binary with `BRANCHENTRY` LSB bit |
9094

9195
`BRANCHENTRY` bit denotes whether a given offset pair is a control flow source

bolt/include/bolt/Profile/BoltAddressTranslation.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,14 @@ class BoltAddressTranslation {
121121

122122
/// Write the serialized address translation table for a function.
123123
template <bool Cold>
124-
void writeMaps(std::map<uint64_t, MapTy> &Maps, raw_ostream &OS);
124+
void writeMaps(std::map<uint64_t, MapTy> &Maps, uint64_t &PrevAddress,
125+
raw_ostream &OS);
125126

126127
/// Read the serialized address translation table for a function.
127128
/// Return a parse error if failed.
128129
template <bool Cold>
129-
void parseMaps(std::vector<uint64_t> &HotFuncs, DataExtractor &DE,
130-
uint64_t &Offset, Error &Err);
130+
void parseMaps(std::vector<uint64_t> &HotFuncs, uint64_t &PrevAddress,
131+
DataExtractor &DE, uint64_t &Offset, Error &Err);
131132

132133
std::map<uint64_t, MapTy> Maps;
133134

0 commit comments

Comments
 (0)