Skip to content

Commit e3c609c

Browse files
authored
Revert "LLVM and SPIRV-LLVM-Translator pulldown (WW41 2024)"
1 parent aebfdc0 commit e3c609c

File tree

6,856 files changed

+145874
-390571
lines changed

Some content is hidden

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

6,856 files changed

+145874
-390571
lines changed

.github/new-prs-labeler.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ mlgo:
668668
- llvm/lib/CodeGen/ML*
669669
- llvm/unittests/CodeGen/ML*
670670
- llvm/test/CodeGen/MLRegAlloc/**
671-
- llvm/utils/mlgo-utils/**
671+
- llvm/utils/mlgo-utils/*
672672

673673
tools:llvm-exegesis:
674674
- llvm/tools/llvm-exegesis/**
@@ -1008,8 +1008,3 @@ bazel:
10081008

10091009
offload:
10101010
- offload/**
1011-
1012-
tablegen:
1013-
- llvm/include/TableGen/**
1014-
- llvm/lib/TableGen/**
1015-
- llvm/utils/TableGen/**

.github/workflows/commit-access-review.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,11 @@ def main():
358358
gh = github.Github(login_or_token=token)
359359
org = gh.get_organization("llvm")
360360
repo = org.get_repo("llvm-project")
361+
team = org.get_team_by_slug("llvm-committers")
361362
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
362363
triage_list = {}
363-
for collaborator in repo.get_collaborators(permission="push"):
364-
triage_list[collaborator.login] = User(collaborator.login, triage_list)
364+
for member in team.get_members():
365+
triage_list[member.login] = User(member.login, triage_list)
365366

366367
print("Start:", len(triage_list), "triagers")
367368
# Step 0 Check if users have requested commit access in the last year.

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ jobs:
242242
- { config: mingw-dll, mingw: true }
243243
- { config: mingw-static, mingw: true }
244244
- { config: mingw-dll-i686, mingw: true }
245-
- { config: mingw-incomplete-sysroot, mingw: true }
246245
steps:
247246
- uses: actions/checkout@v4
248247
- name: Install dependencies
@@ -261,12 +260,6 @@ jobs:
261260
del llvm-mingw*.zip
262261
mv llvm-mingw* c:\llvm-mingw
263262
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
264-
- name: Simulate a from-scratch build of llvm-mingw
265-
if: ${{ matrix.config == 'mingw-incomplete-sysroot' }}
266-
run: |
267-
rm -r c:\llvm-mingw\include\c++
268-
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++*
269-
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind*
270263
- name: Add Git Bash to the path
271264
run: |
272265
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append

.github/workflows/release-binaries.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -442,22 +442,11 @@ jobs:
442442
name: ${{ needs.prepare.outputs.release-binary-filename }}-attestation
443443
path: ${{ needs.prepare.outputs.release-binary-filename }}.jsonl
444444

445-
- name: Checkout Release Scripts
446-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
447-
with:
448-
sparse-checkout: |
449-
llvm/utils/release/github-upload-release.py
450-
llvm/utils/git/requirements.txt
451-
sparse-checkout-cone-mode: false
452-
453-
- name: Install Python Requirements
454-
run: |
455-
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
456-
457445
- name: Upload Release
458446
shell: bash
459447
run: |
460-
./llvm/utils/release/github-upload-release.py \
448+
sudo apt install python3-github
449+
./llvm-project/llvm/utils/release/github-upload-release.py \
461450
--token ${{ github.token }} \
462451
--release ${{ needs.prepare.outputs.release-version }} \
463452
upload \

bolt/include/bolt/Profile/ProfileYAMLMapping.h

Lines changed: 16 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,24 @@ template <> struct MappingTraits<bolt::SuccessorInfo> {
9595

9696
namespace bolt {
9797
struct PseudoProbeInfo {
98-
uint32_t InlineTreeIndex = 0;
99-
uint64_t BlockMask = 0; // bitset with probe indices from 1 to 64
100-
std::vector<uint64_t> BlockProbes; // block probes with indices above 64
101-
std::vector<uint64_t> CallProbes;
102-
std::vector<uint64_t> IndCallProbes;
103-
std::vector<uint32_t> InlineTreeNodes;
98+
llvm::yaml::Hex64 GUID;
99+
uint64_t Index;
100+
uint8_t Type;
104101

105102
bool operator==(const PseudoProbeInfo &Other) const {
106-
return InlineTreeIndex == Other.InlineTreeIndex &&
107-
BlockProbes == Other.BlockProbes && CallProbes == Other.CallProbes &&
108-
IndCallProbes == Other.IndCallProbes;
103+
return GUID == Other.GUID && Index == Other.Index;
104+
}
105+
bool operator!=(const PseudoProbeInfo &Other) const {
106+
return !(*this == Other);
109107
}
110108
};
111109
} // end namespace bolt
112110

113111
template <> struct MappingTraits<bolt::PseudoProbeInfo> {
114112
static void mapping(IO &YamlIO, bolt::PseudoProbeInfo &PI) {
115-
YamlIO.mapOptional("blx", PI.BlockMask, 0);
116-
YamlIO.mapOptional("blk", PI.BlockProbes, std::vector<uint64_t>());
117-
YamlIO.mapOptional("call", PI.CallProbes, std::vector<uint64_t>());
118-
YamlIO.mapOptional("icall", PI.IndCallProbes, std::vector<uint64_t>());
119-
YamlIO.mapOptional("id", PI.InlineTreeIndex, 0);
120-
YamlIO.mapOptional("ids", PI.InlineTreeNodes, std::vector<uint32_t>());
113+
YamlIO.mapRequired("guid", PI.GUID);
114+
YamlIO.mapRequired("id", PI.Index);
115+
YamlIO.mapRequired("type", PI.Type);
121116
}
122117

123118
static const bool flow = true;
@@ -163,35 +158,15 @@ template <> struct MappingTraits<bolt::BinaryBasicBlockProfile> {
163158
std::vector<bolt::CallSiteInfo>());
164159
YamlIO.mapOptional("succ", BBP.Successors,
165160
std::vector<bolt::SuccessorInfo>());
166-
YamlIO.mapOptional("probes", BBP.PseudoProbes,
161+
YamlIO.mapOptional("pseudo_probes", BBP.PseudoProbes,
167162
std::vector<bolt::PseudoProbeInfo>());
168163
}
169164
};
170165

171-
namespace bolt {
172-
struct InlineTreeNode {
173-
uint32_t ParentIndexDelta;
174-
uint32_t CallSiteProbe;
175-
// Index in PseudoProbeDesc.GUID, UINT32_MAX for same as previous (omitted)
176-
uint32_t GUIDIndex;
177-
bool operator==(const InlineTreeNode &) const { return false; }
178-
};
179-
} // end namespace bolt
180-
181-
template <> struct MappingTraits<bolt::InlineTreeNode> {
182-
static void mapping(IO &YamlIO, bolt::InlineTreeNode &ITI) {
183-
YamlIO.mapOptional("g", ITI.GUIDIndex, UINT32_MAX);
184-
YamlIO.mapOptional("p", ITI.ParentIndexDelta, 0);
185-
YamlIO.mapOptional("cs", ITI.CallSiteProbe, 0);
186-
}
187-
188-
static const bool flow = true;
189-
};
190166
} // end namespace yaml
191167
} // end namespace llvm
192168

193169
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::BinaryBasicBlockProfile)
194-
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(llvm::yaml::bolt::InlineTreeNode)
195170

196171
namespace llvm {
197172
namespace yaml {
@@ -204,7 +179,8 @@ struct BinaryFunctionProfile {
204179
llvm::yaml::Hex64 Hash{0};
205180
uint64_t ExecCount{0};
206181
std::vector<BinaryBasicBlockProfile> Blocks;
207-
std::vector<InlineTreeNode> InlineTree;
182+
llvm::yaml::Hex64 GUID{0};
183+
llvm::yaml::Hex64 PseudoProbeDescHash{0};
208184
bool Used{false};
209185
};
210186
} // end namespace bolt
@@ -218,8 +194,9 @@ template <> struct MappingTraits<bolt::BinaryFunctionProfile> {
218194
YamlIO.mapRequired("nblocks", BFP.NumBasicBlocks);
219195
YamlIO.mapOptional("blocks", BFP.Blocks,
220196
std::vector<bolt::BinaryBasicBlockProfile>());
221-
YamlIO.mapOptional("inline_tree", BFP.InlineTree,
222-
std::vector<bolt::InlineTreeNode>());
197+
YamlIO.mapOptional("guid", BFP.GUID, (uint64_t)0);
198+
YamlIO.mapOptional("pseudo_probe_desc_hash", BFP.PseudoProbeDescHash,
199+
(uint64_t)0);
223200
}
224201
};
225202

@@ -269,33 +246,10 @@ template <> struct MappingTraits<bolt::BinaryProfileHeader> {
269246
}
270247
};
271248

272-
namespace bolt {
273-
struct ProfilePseudoProbeDesc {
274-
std::vector<Hex64> GUID;
275-
std::vector<Hex64> Hash;
276-
std::vector<uint32_t> GUIDHashIdx; // Index of hash for that GUID in Hash
277-
278-
bool operator==(const ProfilePseudoProbeDesc &Other) const {
279-
// Only treat empty Desc as equal
280-
return GUID.empty() && Other.GUID.empty() && Hash.empty() &&
281-
Other.Hash.empty() && GUIDHashIdx.empty() &&
282-
Other.GUIDHashIdx.empty();
283-
}
284-
};
285-
} // end namespace bolt
286-
287-
template <> struct MappingTraits<bolt::ProfilePseudoProbeDesc> {
288-
static void mapping(IO &YamlIO, bolt::ProfilePseudoProbeDesc &PD) {
289-
YamlIO.mapRequired("gs", PD.GUID);
290-
YamlIO.mapRequired("gh", PD.GUIDHashIdx);
291-
YamlIO.mapRequired("hs", PD.Hash);
292-
}
293-
};
294249
} // end namespace yaml
295250
} // end namespace llvm
296251

297252
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::BinaryFunctionProfile)
298-
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::ProfilePseudoProbeDesc)
299253

300254
namespace llvm {
301255
namespace yaml {
@@ -304,16 +258,13 @@ namespace bolt {
304258
struct BinaryProfile {
305259
BinaryProfileHeader Header;
306260
std::vector<BinaryFunctionProfile> Functions;
307-
ProfilePseudoProbeDesc PseudoProbeDesc;
308261
};
309262
} // namespace bolt
310263

311264
template <> struct MappingTraits<bolt::BinaryProfile> {
312265
static void mapping(IO &YamlIO, bolt::BinaryProfile &BP) {
313266
YamlIO.mapRequired("header", BP.Header);
314267
YamlIO.mapRequired("functions", BP.Functions);
315-
YamlIO.mapOptional("pseudo_probe_desc", BP.PseudoProbeDesc,
316-
bolt::ProfilePseudoProbeDesc());
317268
}
318269
};
319270

bolt/include/bolt/Profile/YAMLProfileWriter.h

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,8 @@ class YAMLProfileWriter {
3232
/// Save execution profile for that instance.
3333
std::error_code writeProfile(const RewriteInstance &RI);
3434

35-
using InlineTreeMapTy =
36-
DenseMap<const MCDecodedPseudoProbeInlineTree *, uint32_t>;
37-
struct InlineTreeDesc {
38-
template <typename T> using GUIDMapTy = std::unordered_map<uint64_t, T>;
39-
using GUIDNodeMap = GUIDMapTy<const MCDecodedPseudoProbeInlineTree *>;
40-
using GUIDNumMap = GUIDMapTy<uint32_t>;
41-
GUIDNodeMap TopLevelGUIDToInlineTree;
42-
GUIDNumMap GUIDIdxMap;
43-
GUIDNumMap HashIdxMap;
44-
};
45-
46-
static std::tuple<std::vector<yaml::bolt::InlineTreeNode>, InlineTreeMapTy>
47-
convertBFInlineTree(const MCPseudoProbeDecoder &Decoder,
48-
const InlineTreeDesc &InlineTree, uint64_t GUID);
49-
50-
static std::tuple<yaml::bolt::ProfilePseudoProbeDesc, InlineTreeDesc>
51-
convertPseudoProbeDesc(const MCPseudoProbeDecoder &PseudoProbeDecoder);
52-
5335
static yaml::bolt::BinaryFunctionProfile
5436
convert(const BinaryFunction &BF, bool UseDFS,
55-
const InlineTreeDesc &InlineTree,
5637
const BoltAddressTranslation *BAT = nullptr);
5738

5839
/// Set CallSiteInfo destination fields from \p Symbol and return a target
@@ -61,39 +42,8 @@ class YAMLProfileWriter {
6142
setCSIDestination(const BinaryContext &BC, yaml::bolt::CallSiteInfo &CSI,
6243
const MCSymbol *Symbol, const BoltAddressTranslation *BAT,
6344
uint32_t Offset = 0);
64-
65-
private:
66-
struct InlineTreeNode {
67-
const MCDecodedPseudoProbeInlineTree *InlineTree;
68-
uint64_t GUID;
69-
uint64_t Hash;
70-
uint32_t ParentId;
71-
uint32_t InlineSite;
72-
};
73-
static std::vector<InlineTreeNode>
74-
collectInlineTree(const MCPseudoProbeDecoder &Decoder,
75-
const MCDecodedPseudoProbeInlineTree &Root);
76-
77-
// 0 - block probe, 1 - indirect call, 2 - direct call
78-
using ProbeList = std::array<SmallVector<uint64_t, 0>, 3>;
79-
using NodeIdToProbes = DenseMap<uint32_t, ProbeList>;
80-
static std::vector<yaml::bolt::PseudoProbeInfo>
81-
convertNodeProbes(NodeIdToProbes &NodeProbes);
82-
83-
public:
84-
template <typename T>
85-
static std::vector<yaml::bolt::PseudoProbeInfo>
86-
writeBlockProbes(T Probes, const InlineTreeMapTy &InlineTreeNodeId) {
87-
NodeIdToProbes NodeProbes;
88-
for (const MCDecodedPseudoProbe &Probe : Probes) {
89-
auto It = InlineTreeNodeId.find(Probe.getInlineTreeNode());
90-
if (It == InlineTreeNodeId.end())
91-
continue;
92-
NodeProbes[It->second][Probe.getType()].emplace_back(Probe.getIndex());
93-
}
94-
return convertNodeProbes(NodeProbes);
95-
}
9645
};
46+
9747
} // namespace bolt
9848
} // namespace llvm
9949

bolt/include/bolt/Utils/Utils.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ std::string getEscapedName(const StringRef &Name);
4141
/// Return the unescaped name
4242
std::string getUnescapedName(const StringRef &Name);
4343

44-
/// Return a common part for a given \p Name wrt a given \p Suffixes list.
45-
/// Preserve the suffix if \p KeepSuffix is set, only dropping characters
46-
/// following it, otherwise drop the suffix as well.
47-
std::optional<StringRef> getCommonName(const StringRef Name, bool KeepSuffix,
48-
ArrayRef<StringRef> Suffixes);
4944
/// LTO-generated function names take a form:
5045
///
5146
/// <function_name>.lto_priv.<decimal_number>/...

bolt/lib/Passes/ADRRelaxationPass.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,10 @@ void ADRRelaxationPass::runOnFunction(BinaryFunction &BF) {
5959
// Don't relax adr if it points to the same function and it is not split
6060
// and BF initial size is < 1MB.
6161
const unsigned OneMB = 0x100000;
62-
if (BF.getSize() < OneMB) {
62+
if (!BF.isSplit() && BF.getSize() < OneMB) {
6363
BinaryFunction *TargetBF = BC.getFunctionForSymbol(Symbol);
64-
if (TargetBF == &BF && !BF.isSplit())
64+
if (TargetBF && TargetBF == &BF)
6565
continue;
66-
// No relaxation needed if ADR references a basic block in the same
67-
// fragment.
68-
if (BinaryBasicBlock *TargetBB = BF.getBasicBlockForLabel(Symbol))
69-
if (BB.getFragmentNum() == TargetBB->getFragmentNum())
70-
continue;
7166
}
7267

7368
MCPhysReg Reg;

0 commit comments

Comments
 (0)