Skip to content

Commit e623dc3

Browse files
authored
Merge branch 'llvm:main' into clang-tools-headers
2 parents 20d9ca9 + fa23a23 commit e623dc3

File tree

2,707 files changed

+115814
-57040
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,707 files changed

+115814
-57040
lines changed

.github/CODEOWNERS

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
1+
# This file lists reviewers that are auto-assigned when a pull request modifies
2+
# certain files or directories. If you add yourself to this file, you commit to
3+
# reviewing a large fraction of pull requests in the relevant area.
4+
#
5+
# The GitHub "code owners" mechanism is used exclusively to auto-assign
6+
# reviewers and does not carry significance beyond that. It is not necessary
7+
# to receive an approval from a "code owner" in particular -- any LLVM project
8+
# member can approve pull requests.
9+
#
10+
# Note that GitHub's concept of "code owner" is independent from LLVM's own
11+
# "code owner" concept, they merely happen to share terminology. See
12+
# https://llvm.org/docs/DeveloperPolicy.html#code-owners, as well as the
13+
# CODE_OWNERS.txt files in the respective subproject directories.
14+
115
/libcxx/ @llvm/reviewers-libcxx
216
/libcxxabi/ @llvm/reviewers-libcxxabi
317
/libunwind/ @llvm/reviewers-libunwind
418
/runtimes/ @llvm/reviewers-libcxx
19+
20+
/llvm/lib/Analysis/BasicAliasAnalysis.cpp @nikic
21+
/llvm/lib/Analysis/InstructionSimplify.cpp @nikic
22+
/llvm/lib/Analysis/LazyValueInfo.cpp @nikic
23+
/llvm/lib/Analysis/ScalarEvolution.cpp @nikic
24+
/llvm/lib/Analysis/ValueTracking.cpp @nikic
25+
/llvm/lib/IR/ConstantRange.cpp @nikic
26+
/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @nikic
27+
/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp @nikic
28+
/llvm/lib/Transforms/InstCombine/ @nikic
29+
30+
/clang/test/CXX/drs/ @Endilll
31+
/clang/www/cxx_dr_status.html @Endilll
32+
/clang/www/make_cxx_dr_status @Endilll
33+
34+
/lldb/ @JDevlieghere

.github/new-issues-labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
'libc++':
1111
- '/libc[+x]{2}(?!\-)/i'
1212

13-
'libc++-abi':
14-
- '/libc[+x]{2}-abi/i'
13+
'libc++abi':
14+
- '/libc[+x]{2}-?abi/i'
1515

1616
'libc':
1717
- '/\blibc(?![-+])\b/i'

.github/new-prs-labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,6 @@ tools:llvm-mca:
309309
- llvm/include/llvm/MCA/**
310310
- llvm/lib/MCA/**
311311

312-
vectorizers:
313-
- llvm/lib/Transforms/Vectorize/**
314-
- llvm/include/llvm/Transforms/Vectorize/**
315-
316312
clang:
317313
- any:
318314
- clang/**

.github/workflows/llvm-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,17 @@ jobs:
170170
uses: actions/download-artifact@v3
171171
with:
172172
name: build-baseline
173+
path: build-baseline
173174
- name: Download latest
174175
uses: actions/download-artifact@v3
175176
with:
176177
name: build-latest
178+
path: build-latest
177179
- name: Download symbol list
178180
uses: actions/download-artifact@v3
179181
with:
180182
name: symbol-list
183+
path: symbol-list
181184

182185
- name: Install abi-compliance-checker
183186
run: sudo apt-get install abi-compliance-checker

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install clang-format
2828
uses: aminya/setup-cpp@v1
2929
with:
30-
clangformat: 16.0.6
30+
clangformat: 17.0.1
3131

3232
- name: Setup Python env
3333
uses: actions/setup-python@v4

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
matrix:
6969
target:
7070
- triple: x86_64-linux-gnu-ubuntu-22.04
71-
runs-on: ubuntu-22.04-8x32
71+
runs-on: ubuntu-22.04-16x64
7272
debian-build-deps: >
7373
chrpath
7474
gcc-multilib

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,15 @@ class BinaryContext {
871871
return nullptr;
872872
}
873873

874+
/// Retrieves a reference to ELF's _GLOBAL_OFFSET_TABLE_ symbol, which points
875+
/// at GOT, or null if it is not present in the input binary symtab.
876+
BinaryData *getGOTSymbol();
877+
878+
/// Checks if symbol name refers to ELF's _GLOBAL_OFFSET_TABLE_ symbol
879+
bool isGOTSymbol(StringRef SymName) const {
880+
return SymName == "_GLOBAL_OFFSET_TABLE_";
881+
}
882+
874883
/// Return true if \p SymbolName was generated internally and was not present
875884
/// in the input binary.
876885
bool isInternalSymbolName(const StringRef Name) {

bolt/include/bolt/Core/MCPlus.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class MCAnnotation {
6666
kTailCall, /// Tail call.
6767
kConditionalTailCall, /// CTC.
6868
kOffset, /// Offset in the function.
69+
kLabel, /// MCSymbol pointing to this instruction.
6970
kGeneric /// First generic annotation.
7071
};
7172

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ class MCPlusBuilder {
160160
const MCInstrAnalysis *Analysis;
161161
const MCInstrInfo *Info;
162162
const MCRegisterInfo *RegInfo;
163+
const MCSubtargetInfo *STI;
163164

164165
/// Map annotation name into an annotation index.
165166
StringMap<uint64_t> AnnotationNameIndexMap;
@@ -331,8 +332,8 @@ class MCPlusBuilder {
331332

332333
public:
333334
MCPlusBuilder(const MCInstrAnalysis *Analysis, const MCInstrInfo *Info,
334-
const MCRegisterInfo *RegInfo)
335-
: Analysis(Analysis), Info(Info), RegInfo(RegInfo) {
335+
const MCRegisterInfo *RegInfo, const MCSubtargetInfo *STI)
336+
: Analysis(Analysis), Info(Info), RegInfo(RegInfo), STI(STI) {
336337
// Initialize the default annotation allocator with id 0
337338
AnnotationAllocators.emplace(0, AnnotationAllocator());
338339
MaxAllocatorId++;
@@ -1179,6 +1180,13 @@ class MCPlusBuilder {
11791180
/// Remove offset annotation.
11801181
bool clearOffset(MCInst &Inst);
11811182

1183+
/// Return the label of \p Inst, if available.
1184+
std::optional<MCSymbol *> getLabel(const MCInst &Inst) const;
1185+
1186+
/// Set the label of \p Inst. This label will be emitted right before \p Inst
1187+
/// is emitted to MCStreamer.
1188+
bool setLabel(MCInst &Inst, MCSymbol *Label);
1189+
11821190
/// Return MCSymbol that represents a target of this instruction at a given
11831191
/// operand number \p OpNum. If there's no symbol associated with
11841192
/// the operand - return nullptr.
@@ -2079,15 +2087,18 @@ class MCPlusBuilder {
20792087

20802088
MCPlusBuilder *createX86MCPlusBuilder(const MCInstrAnalysis *,
20812089
const MCInstrInfo *,
2082-
const MCRegisterInfo *);
2090+
const MCRegisterInfo *,
2091+
const MCSubtargetInfo *);
20832092

20842093
MCPlusBuilder *createAArch64MCPlusBuilder(const MCInstrAnalysis *,
20852094
const MCInstrInfo *,
2086-
const MCRegisterInfo *);
2095+
const MCRegisterInfo *,
2096+
const MCSubtargetInfo *);
20872097

20882098
MCPlusBuilder *createRISCVMCPlusBuilder(const MCInstrAnalysis *,
20892099
const MCInstrInfo *,
2090-
const MCRegisterInfo *);
2100+
const MCRegisterInfo *,
2101+
const MCSubtargetInfo *);
20912102

20922103
} // namespace bolt
20932104
} // namespace llvm

bolt/include/bolt/Core/Relocation.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ struct Relocation {
8484

8585
/// Special relocation type that allows the linker to modify the instruction.
8686
static bool isX86GOTPCRELX(uint64_t Type);
87+
static bool isX86GOTPC64(uint64_t Type);
8788

8889
/// Return true if relocation type is NONE
8990
static bool isNone(uint64_t Type);
@@ -97,6 +98,10 @@ struct Relocation {
9798
/// Return true if relocation type is for thread local storage.
9899
static bool isTLS(uint64_t Type);
99100

101+
/// Return true of relocation type is for referencing a specific instruction
102+
/// (as opposed to a function, basic block, etc).
103+
static bool isInstructionReference(uint64_t Type);
104+
100105
/// Return code for a NONE relocation
101106
static uint64_t getNone();
102107

0 commit comments

Comments
 (0)