Skip to content

Commit 838bfe2

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW46)
LLVM: llvm/llvm-project@56daf02 SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@1010efc
2 parents e448888 + 27bf506 commit 838bfe2

File tree

2,766 files changed

+102850
-34270
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,766 files changed

+102850
-34270
lines changed

.github/new-prs-labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
clang:dataflow:
2-
- clang/**/Analysis/**/*
2+
- clang/include/clang/Analysis/FlowSensitive/**/*
3+
- clang/lib/Analysis/FlowSensitive/**/*
4+
- clang/unittests/Analysis/FlowSensitive/**/*
5+
- clang/docs/DataFlowAnalysisIntro.md
6+
- clang/docs/DataFlowAnalysisIntroImages/**/*
37

48
clang:frontend:
59
- clang/lib/AST/**/*

.github/workflows/issue-subscriber.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
steps:
1616
- name: Setup Automation Script
1717
run: |
18-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/github-automation.py
19-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/requirements.txt
18+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/github-automation.py
19+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/requirements.txt
2020
chmod a+x github-automation.py
2121
pip install -r requirements.txt
2222

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

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,33 @@ jobs:
1111
- name: Fetch LLVM sources
1212
uses: actions/checkout@v4
1313
with:
14-
fetch-depth: 2 # Fetches only the last 2 commits
14+
ref: ${{ github.event.pull_request.head.sha }}
15+
16+
- name: Checkout through merge base
17+
uses: rmacklin/fetch-through-merge-base@v0
18+
with:
19+
base_ref: ${{ github.event.pull_request.base.ref }}
20+
head_ref: ${{ github.event.pull_request.head.sha }}
21+
deepen_length: 500
1522

1623
- name: Get changed files
1724
id: changed-files
1825
uses: tj-actions/changed-files@v39
1926
with:
2027
separator: ","
21-
fetch_depth: 2000 # Fetches only the last 2000 commits
28+
skip_initial_fetch: true
29+
30+
# We need to make sure that we aren't executing/using any code from the
31+
# PR for security reasons as we're using pull_request_target. Checkout
32+
# the target branch with the necessary files.
33+
- name: Fetch code formatting utils
34+
uses: actions/checkout@v4
35+
with:
36+
sparse-checkout: |
37+
llvm/utils/git/requirements_formatting.txt
38+
llvm/utils/git/code-format-helper.py
39+
sparse-checkout-cone-mode: false
40+
path: code-format-tools
2241

2342
- name: "Listed files"
2443
run: |
@@ -35,10 +54,10 @@ jobs:
3554
with:
3655
python-version: '3.11'
3756
cache: 'pip'
38-
cache-dependency-path: 'llvm/utils/git/requirements_formatting.txt'
57+
cache-dependency-path: 'code-format-tools/llvm/utils/git/requirements_formatting.txt'
3958

4059
- name: Install python dependencies
41-
run: pip install -r llvm/utils/git/requirements_formatting.txt
60+
run: pip install -r code-format-tools/llvm/utils/git/requirements_formatting.txt
4261

4362
- name: Run code formatter
4463
env:
@@ -47,7 +66,7 @@ jobs:
4766
END_REV: ${{ github.event.pull_request.head.sha }}
4867
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
4968
run: |
50-
python llvm/utils/git/code-format-helper.py \
69+
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
5170
--token ${{ secrets.GITHUB_TOKEN }} \
5271
--issue-number $GITHUB_PR_NUMBER \
5372
--start-rev $START_REV \

.github/workflows/pr-subscriber.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
steps:
1616
- name: Setup Automation Script
1717
run: |
18-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/github-automation.py
19-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/requirements.txt
20-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/.github/workflows/pr-subscriber-wait.py
18+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/github-automation.py
19+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/requirements.txt
2120
chmod a+x github-automation.py
2221
pip install -r requirements.txt
2322

bolt/docs/doxygen.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ PREDEFINED =
19541954
EXPAND_AS_DEFINED =
19551955

19561956
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
1957-
# remove all refrences to function-like macros that are alone on a line, have an
1957+
# remove all references to function-like macros that are alone on a line, have an
19581958
# all uppercase name, and do not end with a semicolon. Such function macros are
19591959
# typically used for boiler-plate code, and will confuse the parser if not
19601960
# removed.

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ class BinaryContext {
950950
bool registerFragment(BinaryFunction &TargetFunction,
951951
BinaryFunction &Function) const;
952952

953-
/// Add unterprocedural reference for \p Function to \p Address
953+
/// Add interprocedural reference for \p Function to \p Address
954954
void addInterproceduralReference(BinaryFunction *Function, uint64_t Address) {
955955
InterproceduralReferences.push_back({Function, Address});
956956
}
@@ -1239,8 +1239,8 @@ class BinaryContext {
12391239
uint64_t
12401240
computeInstructionSize(const MCInst &Inst,
12411241
const MCCodeEmitter *Emitter = nullptr) const {
1242-
if (auto Size = MIB->getAnnotationWithDefault<uint32_t>(Inst, "Size"))
1243-
return Size;
1242+
if (std::optional<uint32_t> Size = MIB->getSize(Inst))
1243+
return *Size;
12441244

12451245
if (!Emitter)
12461246
Emitter = this->MCE.get();

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ class BinaryFunction {
319319
/// Execution halts whenever this function is entered.
320320
bool TrapsOnEntry{false};
321321

322-
/// True if the function had an indirect branch with a fixed internal
323-
/// destination.
324-
bool HasFixedIndirectBranch{false};
325-
326322
/// True if the function is a fragment of another function. This means that
327323
/// this function could only be entered via its parent or one of its sibling
328324
/// fragments. It could be entered at any basic block. It can also return
@@ -1445,7 +1441,8 @@ class BinaryFunction {
14451441

14461442
/// Rebuilds BBs layout, ignoring dead BBs. Returns the number of removed
14471443
/// BBs and the removed number of bytes of code.
1448-
std::pair<unsigned, uint64_t> eraseInvalidBBs();
1444+
std::pair<unsigned, uint64_t>
1445+
eraseInvalidBBs(const MCCodeEmitter *Emitter = nullptr);
14491446

14501447
/// Get the relative order between two basic blocks in the original
14511448
/// layout. The result is > 0 if B occurs before A and < 0 if B
@@ -2172,7 +2169,7 @@ class BinaryFunction {
21722169
/// is corrupted. If it is unable to fix it, it returns false.
21732170
bool finalizeCFIState();
21742171

2175-
/// Return true if this function needs an address-transaltion table after
2172+
/// Return true if this function needs an address-translation table after
21762173
/// its code emission.
21772174
bool requiresAddressTranslation() const;
21782175

bolt/include/bolt/Core/BinarySection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class BinarySection {
127127
return *ContentsOrErr;
128128
}
129129

130-
/// Get the set of relocations refering to data in this section that
130+
/// Get the set of relocations referring to data in this section that
131131
/// has been reordered. The relocation offsets will be modified to
132132
/// reflect the new data locations.
133133
RelocationSetType reorderRelocations(bool Inplace) const;

bolt/include/bolt/Core/DebugData.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ std::optional<AttrInfo> findAttributeInfo(const DWARFDie DIE,
6464
dwarf::Attribute Attr);
6565

6666
// DWARF5 Header in order of encoding.
67-
// Types represent encodnig sizes.
67+
// Types represent encoding sizes.
6868
using UnitLengthType = uint32_t;
6969
using VersionType = uint16_t;
7070
using AddressSizeType = uint8_t;
@@ -372,13 +372,13 @@ class DebugAddrWriter {
372372
}
373373

374374
/// Updates AddressToIndex Map.
375-
/// Follows the same symantics as unordered map [].
375+
/// Follows the same semantics as unordered map [].
376376
void updateAddressToIndex(uint64_t Address, uint32_t Index) {
377377
AddressToIndex[Address] = Index;
378378
}
379379

380380
/// Updates IndexToAddress Map.
381-
/// Follows the same symantics as unordered map [].
381+
/// Follows the same semantics as unordered map [].
382382
void updateIndexToAddrss(uint64_t Address, uint32_t Index) {
383383
IndexToAddress[Index] = Address;
384384
}
@@ -474,7 +474,7 @@ class DebugStrWriter {
474474
}
475475

476476
/// Adds string to .debug_str.
477-
/// On first invokation it initializes internal data stractures.
477+
/// On first invocation it initializes internal data structures.
478478
uint32_t addString(StringRef Str);
479479

480480
/// Returns False if no strings were added to .debug_str.
@@ -485,7 +485,7 @@ class DebugStrWriter {
485485
std::mutex WriterMutex;
486486
/// Initializes Buffer and Stream.
487487
void initialize();
488-
/// Creats internal data stractures.
488+
/// Creates internal data structures.
489489
void create();
490490
std::unique_ptr<DebugStrBufferVector> StrBuffer;
491491
std::unique_ptr<raw_svector_ostream> StrStream;
@@ -585,7 +585,7 @@ class DebugLoclistWriter : public DebugLocWriter {
585585
void finalize(DIEBuilder &DIEBldr, DIE &Die) override;
586586

587587
/// Returns CU ID.
588-
/// For Skelton CU it is a CU Offset.
588+
/// For Skeleton CU it is a CU Offset.
589589
/// For DWO CU it is a DWO ID.
590590
uint64_t getCUID() const {
591591
return CU.isDWOUnit() ? *CU.getDWOId() : CU.getOffset();

bolt/include/bolt/Core/DynoStats.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class DynoStats {
121121
/// Maps instruction opcodes to:
122122
/// 1. Accumulated executed instruction counts.
123123
/// 2. a multimap that records highest execution counts, function names,
124-
/// and BB offsets where intructions of these opcodes occur.
124+
/// and BB offsets where instructions of these opcodes occur.
125125
using MaxOpcodeHistogramTy =
126126
std::multimap<uint64_t, std::pair<StringRef, uint32_t>>;
127127
using OpcodeHistogramTy =

0 commit comments

Comments
 (0)