Skip to content

Commit de93771

Browse files
committed
Merge branch 'main' into users/kparzysz/spr/a05-makeclause
2 parents 46770f8 + 20d653f commit de93771

File tree

4,995 files changed

+250332
-137456
lines changed

Some content is hidden

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

4,995 files changed

+250332
-137456
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ clang/test/AST/Interp/ @tbaederr
115115
/mlir/**/LLVMIR/**/BasicPtxBuilderInterface* @grypp
116116
/mlir/**/NVVM*/ @grypp
117117

118+
# MLIR Python Bindings
119+
/mlir/test/python/ @makslevental @stellaraccident
120+
/mlir/python/ @makslevental @stellaraccident
121+
118122
# BOLT
119123
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci
120124

@@ -125,3 +129,6 @@ clang/test/AST/Interp/ @tbaederr
125129
/llvm/**/TextAPI/ @cyndyishida
126130
/clang/**/InstallAPI/ @cyndyishida
127131
/clang/tools/clang-installapi/ @cyndyishida
132+
133+
# ExtractAPI
134+
/clang/**/ExtractAPI @daniel-grumberg

.github/workflows/email-check.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Check for private emails used in PRs"
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types:
66
- opened
77

@@ -10,8 +10,6 @@ permissions:
1010

1111
jobs:
1212
validate_email:
13-
permissions:
14-
pull-requests: write
1513
runs-on: ubuntu-latest
1614
if: github.repository == 'llvm/llvm-project'
1715
steps:
@@ -25,20 +23,24 @@ jobs:
2523
run: |
2624
git log -1
2725
echo "EMAIL=$(git show -s --format='%ae' HEAD~0)" >> $GITHUB_OUTPUT
26+
# Create empty comment file
27+
echo "[]" > comments
2828
2929
- name: Validate author email
3030
if: ${{ endsWith(steps.author.outputs.EMAIL, 'noreply.github.com') }}
31-
uses: actions/github-script@v6
3231
env:
33-
EMAIL: ${{ steps.author.outputs.EMAIL }}
32+
COMMENT: >-
33+
⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.<br/>
34+
Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.<br/>
35+
See [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information.
36+
run: |
37+
cat << EOF > comments
38+
[{"body" : "$COMMENT"}]
39+
EOF
40+
41+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
42+
if: always()
3443
with:
35-
script: |
36-
const { EMAIL } = process.env
37-
await github.rest.issues.createComment({
38-
issue_number: context.issue.number,
39-
owner: context.repo.owner,
40-
repo: context.repo.repo,
41-
body: `⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
42-
Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.
43-
See [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information.
44-
`})
44+
name: workflow-args
45+
path: |
46+
comments

.github/workflows/issue-write.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Comment on an issue
22

33
on:
44
workflow_run:
5-
workflows: ["Check code formatting"]
5+
workflows:
6+
- "Check code formatting"
7+
- "Check for private emails used in PRs"
68
types:
79
- completed
810

@@ -31,7 +33,7 @@ jobs:
3133
script: |
3234
var fs = require('fs');
3335
const comments = JSON.parse(fs.readFileSync('./comments'));
34-
if (!comments) {
36+
if (!comments || comments.length == 0) {
3537
return;
3638
}
3739
@@ -77,6 +79,15 @@ jobs:
7779
}
7880
const gql_result = await github.graphql(gql_query, gql_variables);
7981
console.log(gql_result);
82+
// If the branch for the PR was deleted before this job has a chance
83+
// to run, then the ref will be null. This can happen if someone:
84+
// 1. Rebase the PR, which triggers some workflow.
85+
// 2. Immediately merges the PR and deletes the branch.
86+
// 3. The workflow finishes and triggers this job.
87+
if (!gql_result.repository.ref) {
88+
console.log("Ref has been deleted");
89+
return;
90+
}
8091
console.log(gql_result.repository.ref.associatedPullRequests.nodes);
8192
8293
var pr_number = 0;

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ env:
3838
# LLVM POST-BRANCH bump version
3939
# LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
4040
# LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
41-
LLVM_HEAD_VERSION: "18" # Used compiler, update POST-BRANCH.
42-
LLVM_PREVIOUS_VERSION: "17"
43-
LLVM_OLDEST_VERSION: "16"
41+
LLVM_HEAD_VERSION: "19" # Used compiler, update POST-BRANCH.
42+
LLVM_PREVIOUS_VERSION: "18"
43+
LLVM_OLDEST_VERSION: "17"
4444
GCC_STABLE_VERSION: "13"
45-
LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-18"
45+
LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-19"
4646
CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"
4747

4848

@@ -59,8 +59,8 @@ jobs:
5959
'generic-cxx26',
6060
'generic-modules'
6161
]
62-
cc: [ 'clang-18' ]
63-
cxx: [ 'clang++-18' ]
62+
cc: [ 'clang-19' ]
63+
cxx: [ 'clang++-19' ]
6464
clang_tidy: [ 'ON' ]
6565
include:
6666
- config: 'generic-gcc'
@@ -100,22 +100,22 @@ jobs:
100100
'generic-cxx20',
101101
'generic-cxx23'
102102
]
103-
cc: [ 'clang-18' ]
104-
cxx: [ 'clang++-18' ]
103+
cc: [ 'clang-19' ]
104+
cxx: [ 'clang++-19' ]
105105
clang_tidy: [ 'ON' ]
106106
include:
107107
- config: 'generic-gcc-cxx11'
108108
cc: 'gcc-13'
109109
cxx: 'g++-13'
110110
clang_tidy: 'OFF'
111-
- config: 'generic-cxx23'
112-
cc: 'clang-16'
113-
cxx: 'clang++-16'
114-
clang_tidy: 'OFF'
115111
- config: 'generic-cxx23'
116112
cc: 'clang-17'
117113
cxx: 'clang++-17'
118114
clang_tidy: 'OFF'
115+
- config: 'generic-cxx26'
116+
cc: 'clang-18'
117+
cxx: 'clang++-18'
118+
clang_tidy: 'ON'
119119
steps:
120120
- uses: actions/checkout@v4
121121
- name: ${{ matrix.config }}
@@ -186,8 +186,8 @@ jobs:
186186
- name: ${{ matrix.config }}
187187
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
188188
env:
189-
CC: clang-18
190-
CXX: clang++-18
189+
CC: clang-19
190+
CXX: clang++-19
191191
ENABLE_CLANG_TIDY: "OFF"
192192
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
193193
if: always()

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: "Check code formatting"
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
pull_request:
48
branches:
@@ -33,7 +37,7 @@ jobs:
3337
- name: Fetch code formatting utils
3438
uses: actions/checkout@v4
3539
with:
36-
reository: ${{ github.repository }}
40+
repository: ${{ github.repository }}
3741
ref: ${{ github.base_ref }}
3842
sparse-checkout: |
3943
llvm/utils/git/requirements_formatting.txt

.github/workflows/release-lit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
cd llvm/utils/lit
5959
# Remove 'dev' suffix from lit version.
6060
sed -i 's/ + "dev"//g' lit/__init__.py
61-
python3 setup.py sdist
61+
python3 setup.py sdist bdist_wheel
6262
6363
- name: Upload lit to test.pypi.org
6464
uses: pypa/gh-action-pypi-publish@release/v1

bolt/docs/BAT.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ Hot indices are delta encoded, implicitly starting at zero.
8181
| `FuncHash` | 8b | Function hash for input function | Hot |
8282
| `NumBlocks` | ULEB128 | Number of basic blocks in the original function | Hot |
8383
| `NumSecEntryPoints` | ULEB128 | Number of secondary entry points in the original function | Hot |
84+
| `ColdInputSkew` | ULEB128 | Skew to apply to all input offsets | Cold |
8485
| `NumEntries` | ULEB128 | Number of address translation entries for a function | Both |
85-
| `EqualElems` | ULEB128 | Number of equal offsets in the beginning of a function | Hot |
86-
| `BranchEntries` | Bitmask, `alignTo(EqualElems, 8)` bits | If `EqualElems` is non-zero, bitmask denoting entries with `BRANCHENTRY` bit | Hot |
86+
| `EqualElems` | ULEB128 | Number of equal offsets in the beginning of a function | Both |
87+
| `BranchEntries` | Bitmask, `alignTo(EqualElems, 8)` bits | If `EqualElems` is non-zero, bitmask denoting entries with `BRANCHENTRY` bit | Both |
8788

8889
Function header is followed by *Address Translation Table* with `NumEntries`
8990
total entries, and *Secondary Entry Points* table with `NumSecEntryPoints`
@@ -99,8 +100,8 @@ entry is encoded. Input offsets implicitly start at zero.
99100
| `BBHash` | Optional, 8b | Basic block hash in input binary | BB |
100101
| `BBIdx` | Optional, Delta, ULEB128 | Basic block index in input binary | BB |
101102

102-
For hot fragments, the table omits the first `EqualElems` input offsets
103-
where the input offset equals output offset.
103+
The table omits the first `EqualElems` input offsets where the input offset
104+
equals output offset.
104105

105106
`BRANCHENTRY` bit denotes whether a given offset pair is a control flow source
106107
(branch or call instruction). If not set, it signifies a control flow target

bolt/include/bolt/Core/AddressMap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#ifndef BOLT_CORE_ADDRESS_MAP_H
1515
#define BOLT_CORE_ADDRESS_MAP_H
1616

17-
#include "llvm/ADT/StringRef.h"
1817
#include "llvm/MC/MCSymbol.h"
1918

2019
#include <optional>

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ class BinaryContext {
265265

266266
public:
267267
static Expected<std::unique_ptr<BinaryContext>>
268-
createBinaryContext(const ObjectFile *File, bool IsPIC,
268+
createBinaryContext(Triple TheTriple, StringRef InputFileName,
269+
SubtargetFeatures *Features, bool IsPIC,
269270
std::unique_ptr<DWARFContext> DwCtx,
270271
JournalingStreams Logger);
271272

bolt/include/bolt/Core/BinaryData.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "llvm/ADT/Twine.h"
1919
#include "llvm/MC/MCSymbol.h"
2020
#include "llvm/Support/raw_ostream.h"
21-
#include <algorithm>
2221
#include <string>
2322
#include <vector>
2423

@@ -108,7 +107,6 @@ class BinaryData {
108107
std::vector<MCSymbol *> &getSymbols() { return Symbols; }
109108

110109
bool hasName(StringRef Name) const;
111-
bool hasNameRegex(StringRef Name) const;
112110
bool nameStartsWith(StringRef Prefix) const;
113111

114112
bool hasSymbol(const MCSymbol *Symbol) const {

bolt/include/bolt/Core/BinaryDomTree.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "bolt/Core/BinaryBasicBlock.h"
1818
#include "llvm/IR/Dominators.h"
19-
#include "llvm/Support/GenericDomTreeConstruction.h"
2019

2120
namespace llvm {
2221
namespace bolt {

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "bolt/Core/BinaryBasicBlock.h"
2929
#include "bolt/Core/BinaryContext.h"
30+
#include "bolt/Core/BinaryDomTree.h"
3031
#include "bolt/Core/BinaryLoop.h"
3132
#include "bolt/Core/BinarySection.h"
3233
#include "bolt/Core/DebugData.h"
@@ -51,7 +52,6 @@
5152
#include <iterator>
5253
#include <limits>
5354
#include <unordered_map>
54-
#include <unordered_set>
5555
#include <utility>
5656
#include <vector>
5757

@@ -266,6 +266,7 @@ class BinaryFunction {
266266
BinaryContext &BC;
267267

268268
std::unique_ptr<BinaryLoopInfo> BLI;
269+
std::unique_ptr<BinaryDominatorTree> BDT;
269270

270271
/// All labels in the function that are referenced via relocations from
271272
/// data objects. Typically these are jump table destinations and computed
@@ -838,6 +839,14 @@ class BinaryFunction {
838839
/// stats.
839840
void calculateMacroOpFusionStats();
840841

842+
/// Returns if BinaryDominatorTree has been constructed for this function.
843+
bool hasDomTree() const { return BDT != nullptr; }
844+
845+
BinaryDominatorTree &getDomTree() { return *BDT.get(); }
846+
847+
/// Constructs DomTree for this function.
848+
void constructDomTree();
849+
841850
/// Returns if loop detection has been run for this function.
842851
bool hasLoopInfo() const { return BLI != nullptr; }
843852

@@ -1159,7 +1168,7 @@ class BinaryFunction {
11591168
/// Pass an offset of the entry point in the input binary and a corresponding
11601169
/// global symbol to the callback function.
11611170
///
1162-
/// Return true of all callbacks returned true, false otherwise.
1171+
/// Return true if all callbacks returned true, false otherwise.
11631172
bool forEachEntryPoint(EntryPointCallbackTy Callback) const;
11641173

11651174
/// Return MC symbol associated with the end of the function.
@@ -1393,7 +1402,8 @@ class BinaryFunction {
13931402

13941403
/// Return true if the function has CFI instructions
13951404
bool hasCFI() const {
1396-
return !FrameInstructions.empty() || !CIEFrameInstructions.empty();
1405+
return !FrameInstructions.empty() || !CIEFrameInstructions.empty() ||
1406+
IsInjected;
13971407
}
13981408

13991409
/// Return unique number associated with the function.

bolt/include/bolt/Core/BinaryLoop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef BOLT_CORE_BINARY_LOOP_H
1616
#define BOLT_CORE_BINARY_LOOP_H
1717

18-
#include "llvm/Support/GenericLoopInfoImpl.h"
18+
#include "llvm/Support/GenericLoopInfo.h"
1919

2020
namespace llvm {
2121
namespace bolt {

bolt/include/bolt/Core/BinarySection.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "bolt/Core/DebugData.h"
1919
#include "bolt/Core/Relocation.h"
2020
#include "llvm/ADT/ArrayRef.h"
21-
#include "llvm/ADT/STLExtras.h"
2221
#include "llvm/BinaryFormat/ELF.h"
2322
#include "llvm/Object/ELFObjectFile.h"
2423
#include "llvm/Object/MachO.h"

bolt/include/bolt/Core/DebugData.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <mutex>
2828
#include <string>
2929
#include <unordered_map>
30-
#include <unordered_set>
3130
#include <utility>
3231
#include <vector>
3332

bolt/include/bolt/Core/DebugNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifndef BOLT_CORE_DEBUG_NAMES_H
1515
#define BOLT_CORE_DEBUG_NAMES_H
1616

17-
#include "DebugData.h"
17+
#include "bolt/Core/DebugData.h"
1818
#include "llvm/CodeGen/AccelTable.h"
1919

2020
namespace llvm {

bolt/include/bolt/Core/FunctionLayout.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "llvm/ADT/iterator.h"
2626
#include "llvm/ADT/iterator_range.h"
2727
#include <iterator>
28-
#include <utility>
2928

3029
namespace llvm {
3130
namespace bolt {

bolt/include/bolt/Core/MCPlus.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
#ifndef BOLT_CORE_MCPLUS_H
1515
#define BOLT_CORE_MCPLUS_H
1616

17-
#include "llvm/CodeGen/TargetOpcodes.h"
1817
#include "llvm/MC/MCExpr.h"
1918
#include "llvm/MC/MCInst.h"
20-
#include "llvm/Support/Casting.h"
2119
#include <vector>
2220

2321
namespace llvm {

0 commit comments

Comments
 (0)