Skip to content

Commit 5392ab8

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW50)
LLVM: llvm/llvm-project@9bd32d7 SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@0166a0f
2 parents bd4a460 + da14480 commit 5392ab8

File tree

2,900 files changed

+279970
-36446
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,900 files changed

+279970
-36446
lines changed

.git-blame-ignore-revs

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

6868
# [libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI
6969
4c198542226223f6a5c5511a1f89b37d15ee10b9
70+
71+
# [libc++] Replace uses of _VSTD:: by std:: (#74331)
72+
77a00c0d546cd4aa8311b5b9031ae9ea8cdb050c

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ jobs:
160160
'generic-no-tzdb',
161161
'generic-no-unicode',
162162
'generic-no-wide-characters',
163+
'generic-no-rtti',
163164
'generic-static',
164165
'generic-with_llvm_unwinder',
165166
# TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
required: false
1111
projects:
1212
required: false
13+
extra_cmake_args:
14+
required: false
15+
os_list:
16+
required: false
17+
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
1318
workflow_call:
1419
inputs:
1520
build_target:
@@ -20,6 +25,19 @@ on:
2025
required: true
2126
type: string
2227

28+
extra_cmake_args:
29+
required: false
30+
type: string
31+
32+
os_list:
33+
required: false
34+
type: string
35+
# Use windows-2019 due to:
36+
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
37+
# We're using a specific version of macOS due to:
38+
# https://github.com/actions/virtual-environments/issues/5900
39+
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
40+
2341
concurrency:
2442
# Skip intermediate builds: always.
2543
# Cancel intermediate builds: only if it is a pull request build.
@@ -35,14 +53,7 @@ jobs:
3553
strategy:
3654
fail-fast: false
3755
matrix:
38-
os:
39-
- ubuntu-latest
40-
# Use windows-2019 due to:
41-
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
42-
- windows-2019
43-
# We're using a specific version of macOS due to:
44-
# https://github.com/actions/virtual-environments/issues/5900
45-
- macOS-11
56+
os: ${{ fromJSON(inputs.os_list) }}
4657
steps:
4758
- name: Setup Windows
4859
if: startsWith(matrix.os, 'windows')
@@ -85,7 +96,7 @@ jobs:
8596
# This should be a no-op for non-mac OSes
8697
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
8798
with:
88-
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache'
99+
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ inputs.extra_cmake_args }}'
89100
build_target: '${{ inputs.build_target }}'
90101

91102
- name: Build and Test libclc

.github/workflows/new-prs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,19 @@ jobs:
2020
permissions:
2121
pull-requests: write
2222
# Only comment on PRs that have been opened for the first time, by someone
23-
# new to LLVM or to GitHub as a whole.
23+
# new to LLVM or to GitHub as a whole. Ideally we'd look for FIRST_TIMER
24+
# or FIRST_TIME_CONTRIBUTOR, but this does not appear to work. Instead check
25+
# that we do not have any of the other author associations.
26+
# See https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=opened#pull_request
27+
# for all the possible values.
2428
if: >-
2529
(github.repository == 'llvm/llvm-project') &&
2630
(github.event.action == 'opened') &&
27-
(github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' ||
28-
github.event.pull_request.author_association == 'FIRST_TIMER')
31+
(github.event.pull_request.author_association != 'COLLABORATOR') &&
32+
(github.event.pull_request.author_association != 'CONTRIBUTOR') &&
33+
(github.event.pull_request.author_association != 'MANNEQUIN') &&
34+
(github.event.pull_request.author_association != 'MEMBER') &&
35+
(github.event.pull_request.author_association != 'OWNER')
2936
steps:
3037
- name: Setup Automation Script
3138
run: |

.github/workflows/pr-code-format.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ jobs:
6767
START_REV: ${{ github.event.pull_request.base.sha }}
6868
END_REV: ${{ github.event.pull_request.head.sha }}
6969
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
70+
# TODO(boomanaiden154): Once clang v18 is released, we should be able
71+
# to take advantage of the new --diff_from_common_commit option
72+
# explicitly in code-format-helper.py and not have to diff starting at
73+
# the merge base.
7074
run: |
7175
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
7276
--token ${{ secrets.GITHUB_TOKEN }} \
7377
--issue-number $GITHUB_PR_NUMBER \
74-
--start-rev $START_REV \
78+
--start-rev $(git merge-base $START_REV $END_REV) \
7579
--end-rev $END_REV \
7680
--changed-files "$CHANGED_FILES"

.github/workflows/spirv-tests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: SPIR-V Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
paths:
10+
- 'llvm/lib/Target/SPIRV/**'
11+
- 'llvm/test/CodeGen/SPIRV/**'
12+
- '.github/workflows/spirv-tests.yml'
13+
14+
concurrency:
15+
# Skip intermediate builds: always.
16+
# Cancel intermediate builds: only if it is a pull request build.
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
19+
20+
jobs:
21+
check_spirv:
22+
if: github.repository_owner == 'llvm'
23+
name: Test SPIR-V
24+
uses: ./.github/workflows/llvm-project-tests.yml
25+
with:
26+
build_target: check-llvm-codegen-spirv
27+
projects:
28+
extra_cmake_args: '-DLLVM_TARGETS_TO_BUILD="" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="SPIRV"'
29+
os_list: '["ubuntu-latest"]'

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
<qiucofan@cn.ibm.com> <qiucf@cn.ibm.com>
3434
<rnk@google.com> <reid@kleckner.net>
3535
<thakis@chromium.org> <nicolasweber@gmx.de>
36+
Jianjian GUAN <jacquesguan@me.com>
37+
Jianjian GUAN <jacquesguan@me.com> <Jianjian.Guan@streamcomputing.com>
3638
Jon Roelofs <jonathan_roelofs@apple.com> <jonathan@codesourcery.com>
3739
Jon Roelofs <jonathan_roelofs@apple.com> <jroelofs@jroelofs.com>
3840
Jonathan Thackray <jonathan.thackray@arm.com> <jthackray@users.noreply.github.com>

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ enum IndirectCallPromotionType : char {
7575
ICP_ALL /// Perform ICP on calls and jump tables.
7676
};
7777

78+
/// Hash functions supported for BF/BB hashing.
79+
enum class HashFunction : char {
80+
StdHash, /// std::hash, implementation is platform-dependent. Provided for
81+
/// backwards compatibility.
82+
XXH3, /// llvm::xxh3_64bits, the default.
83+
Default = XXH3,
84+
};
85+
7886
/// Information on a single indirect call to a particular callee.
7987
struct IndirectCallProfile {
8088
MCSymbol *Symbol;
@@ -2234,18 +2242,21 @@ class BinaryFunction {
22342242
///
22352243
/// If \p UseDFS is set, process basic blocks in DFS order. Otherwise, use
22362244
/// the existing layout order.
2245+
/// \p HashFunction specifies which function is used for BF hashing.
22372246
///
22382247
/// By default, instruction operands are ignored while calculating the hash.
22392248
/// The caller can change this via passing \p OperandHashFunc function.
22402249
/// The return result of this function will be mixed with internal hash.
22412250
size_t computeHash(
2242-
bool UseDFS = false,
2251+
bool UseDFS = false, HashFunction HashFunction = HashFunction::Default,
22432252
OperandHashFuncTy OperandHashFunc = [](const MCOperand &) {
22442253
return std::string();
22452254
}) const;
22462255

22472256
/// Compute hash values for each block of the function.
2248-
void computeBlockHashes() const;
2257+
/// \p HashFunction specifies which function is used for BB hashing.
2258+
void
2259+
computeBlockHashes(HashFunction HashFunction = HashFunction::Default) const;
22492260

22502261
void setDWARFUnit(DWARFUnit *Unit) { DwarfUnit = Unit; }
22512262

bolt/include/bolt/Core/DebugData.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,6 @@ class DebugStrOffsetsWriter {
459459
std::unique_ptr<raw_svector_ostream> StrOffsetsStream;
460460
std::map<uint32_t, uint32_t> IndexToAddressMap;
461461
std::unordered_map<uint64_t, uint64_t> ProcessedBaseOffsets;
462-
// Section size not including header.
463-
uint32_t CurrentSectionSize{0};
464462
bool StrOffsetSectionWasModified = false;
465463
};
466464

bolt/include/bolt/Profile/ProfileYAMLMapping.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ template <> struct ScalarBitSetTraits<PROFILE_PF> {
178178
}
179179
};
180180

181+
template <> struct ScalarEnumerationTraits<llvm::bolt::HashFunction> {
182+
using HashFunction = llvm::bolt::HashFunction;
183+
static void enumeration(IO &io, HashFunction &value) {
184+
io.enumCase(value, "std-hash", HashFunction::StdHash);
185+
io.enumCase(value, "xxh3", HashFunction::XXH3);
186+
}
187+
};
188+
181189
namespace bolt {
182190
struct BinaryProfileHeader {
183191
uint32_t Version{1};
@@ -188,6 +196,7 @@ struct BinaryProfileHeader {
188196
std::string Origin; // How the profile was obtained.
189197
std::string EventNames; // Events used for sample profile.
190198
bool IsDFSOrder{true}; // Whether using DFS block order in function profile
199+
llvm::bolt::HashFunction HashFunction; // Hash used for BB/BF hashing
191200
};
192201
} // end namespace bolt
193202

@@ -200,6 +209,8 @@ template <> struct MappingTraits<bolt::BinaryProfileHeader> {
200209
YamlIO.mapOptional("profile-origin", Header.Origin);
201210
YamlIO.mapOptional("profile-events", Header.EventNames);
202211
YamlIO.mapOptional("dfs-order", Header.IsDFSOrder);
212+
YamlIO.mapOptional("hash-func", Header.HashFunction,
213+
llvm::bolt::HashFunction::StdHash);
203214
}
204215
};
205216

0 commit comments

Comments
 (0)