Skip to content

Commit f1d72e0

Browse files
author
joaosaffran
committed
Revert "Merge branch 'main' into obj2yaml/root-descriptors"
This reverts commit eecea5b, reversing changes made to d982395.
1 parent eecea5b commit f1d72e0

File tree

2,545 files changed

+90607
-194841
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,545 files changed

+90607
-194841
lines changed

.ci/compute_projects.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252
"clang": {"clang-tools-extra", "compiler-rt", "cross-project-tests"},
5353
"clang-tools-extra": {"libc"},
5454
"mlir": {"flang"},
55-
# Test everything if ci scripts are changed.
56-
# FIXME: Figure out what is missing and add here.
57-
".ci": {"llvm", "clang", "lld", "lldb"},
5855
}
5956

6057
DEPENDENT_RUNTIMES_TO_TEST = {"clang": {"libcxx", "libcxxabi", "libunwind"}}
@@ -133,11 +130,12 @@ def _add_dependencies(projects: Set[str]) -> Set[str]:
133130
def _compute_projects_to_test(modified_projects: Set[str], platform: str) -> Set[str]:
134131
projects_to_test = set()
135132
for modified_project in modified_projects:
133+
# Skip all projects where we cannot run tests.
134+
if modified_project not in PROJECT_CHECK_TARGETS:
135+
continue
136136
if modified_project in RUNTIMES:
137137
continue
138-
# Skip all projects where we cannot run tests.
139-
if modified_project in PROJECT_CHECK_TARGETS:
140-
projects_to_test.add(modified_project)
138+
projects_to_test.add(modified_project)
141139
if modified_project not in DEPENDENTS_TO_TEST:
142140
continue
143141
for dependent_project in DEPENDENTS_TO_TEST[modified_project]:

.ci/compute_projects_test.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -188,23 +188,6 @@ def test_exclude_gn(self):
188188
self.assertEqual(env_variables["runtimes_to_build"], "")
189189
self.assertEqual(env_variables["runtimes_check_targets"], "")
190190

191-
def test_ci(self):
192-
env_variables = compute_projects.get_env_variables(
193-
[".ci/compute_projects.py"], "Linux"
194-
)
195-
self.assertEqual(env_variables["projects_to_build"], "clang;lld;llvm;lldb")
196-
self.assertEqual(
197-
env_variables["project_check_targets"],
198-
"check-clang check-lld check-llvm check-lldb",
199-
)
200-
self.assertEqual(
201-
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
202-
)
203-
self.assertEqual(
204-
env_variables["runtimes_check_targets"],
205-
"check-cxx check-cxxabi check-unwind",
206-
)
207-
208191

209192
if __name__ == "__main__":
210193
unittest.main()

.ci/monolithic-linux.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@ if [[ -n "${CLEAR_CACHE:-}" ]]; then
2828
ccache --clear
2929
fi
3030

31-
mkdir -p artifacts/reproducers
32-
33-
# Make sure any clang reproducers will end up as artifacts.
34-
export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
35-
3631
function at-exit {
3732
retcode=$?
3833

34+
mkdir -p artifacts
3935
ccache --print-stats > artifacts/ccache_stats.txt
4036
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
4137

@@ -62,18 +58,9 @@ export PIP_BREAK_SYSTEM_PACKAGES=1
6258
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
6359
pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
6460
pip install -q -r "${MONOREPO_ROOT}"/.ci/requirements.txt
65-
66-
# Set the system llvm-symbolizer as preferred.
67-
export LLVM_SYMBOLIZER_PATH=`which llvm-symbolizer`
68-
[[ ! -f "${LLVM_SYMBOLIZER_PATH}" ]] && echo "llvm-symbolizer not found!"
69-
70-
# Set up all runtimes either way. libcxx is a dependency of LLDB.
71-
# It will not be built unless it is used.
7261
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7362
-D LLVM_ENABLE_PROJECTS="${projects}" \
74-
-D LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
7563
-G Ninja \
76-
-D CMAKE_PREFIX_PATH="${HOME}/.local" \
7764
-D CMAKE_BUILD_TYPE=Release \
7865
-D LLVM_ENABLE_ASSERTIONS=ON \
7966
-D LLVM_BUILD_EXAMPLES=ON \
@@ -82,10 +69,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
8269
-D LLVM_ENABLE_LLD=ON \
8370
-D CMAKE_CXX_FLAGS=-gmlt \
8471
-D LLVM_CCACHE_BUILD=ON \
85-
-D LIBCXX_CXX_ABI=libcxxabi \
8672
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
87-
-D LLDB_ENABLE_PYTHON=ON \
88-
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
8973
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
9074

9175
echo "--- ninja"

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
/mlir/**/Transforms/SROA.* @moxinilian
129129

130130
# BOLT
131-
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9
131+
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci @yota9
132132

133133
# Bazel build system.
134134
/utils/bazel/ @rupprecht @keith @aaronmondal

.github/new-prs-labeler.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ ClangIR:
77
- clang/tools/cir-*/**/*
88
- clang/test/CIR/**/*
99

10-
clang:bytecode:
11-
- clang/docs/ConstantInterpreter.rst
12-
- clang/lib/AST/ByteCode/**/*
13-
- clang/test/AST/ByteCode/**/*
14-
- clang/unittests/AST/ByteCode/**/*
15-
1610
clang:dataflow:
1711
- clang/include/clang/Analysis/FlowSensitive/**/*
1812
- clang/lib/Analysis/FlowSensitive/**/*

bolt/include/bolt/Profile/DataAggregator.h

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,16 +223,14 @@ class DataAggregator : public DataReader {
223223
bool recordExit(BinaryFunction &BF, uint64_t From, bool Mispred,
224224
uint64_t Count = 1) const;
225225

226-
/// Branch stacks aggregation statistics
227-
uint64_t NumTraces{0};
226+
/// Aggregation statistics
228227
uint64_t NumInvalidTraces{0};
229228
uint64_t NumLongRangeTraces{0};
230229
/// Specifies how many samples were recorded in cold areas if we are dealing
231230
/// with profiling data collected in a bolted binary. For LBRs, incremented
232231
/// for the source of the branch to avoid counting cold activity twice (one
233232
/// for source and another for destination).
234233
uint64_t NumColdSamples{0};
235-
uint64_t NumTotalSamples{0};
236234

237235
/// Looks into system PATH for Linux Perf and set up the aggregator to use it
238236
void findPerfExecutable();
@@ -329,8 +327,8 @@ class DataAggregator : public DataReader {
329327
/// Parse a single LBR entry as output by perf script -Fbrstack
330328
ErrorOr<LBREntry> parseLBREntry();
331329

332-
/// Parse LBR sample.
333-
void parseLBRSample(const PerfBranchSample &Sample, bool NeedsSkylakeFix);
330+
/// Parse LBR sample, returns the number of traces.
331+
uint64_t parseLBRSample(const PerfBranchSample &Sample, bool NeedsSkylakeFix);
334332

335333
/// Parse and pre-aggregate branch events.
336334
std::error_code parseBranchEvents();
@@ -489,13 +487,6 @@ class DataAggregator : public DataReader {
489487
void dump(const PerfBranchSample &Sample) const;
490488
void dump(const PerfMemSample &Sample) const;
491489

492-
/// Profile diagnostics print methods
493-
void printColdSamplesDiagnostic() const;
494-
void printLongRangeTracesDiagnostic() const;
495-
void printBranchSamplesDiagnostics() const;
496-
void printBasicSamplesDiagnostics(uint64_t OutOfRangeSamples) const;
497-
void printBranchStacksDiagnostics(uint64_t IgnoredSamples) const;
498-
499490
public:
500491
/// If perf.data was collected without build ids, the buildid-list may contain
501492
/// incomplete entries. Return true if the buffer containing

bolt/lib/Core/BinaryBasicBlock.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ void BinaryBasicBlock::updateJumpTableSuccessors() {
372372
[](const BinaryBasicBlock *BB1, const BinaryBasicBlock *BB2) {
373373
return BB1->getInputOffset() < BB2->getInputOffset();
374374
});
375-
SuccessorBBs.erase(llvm::unique(SuccessorBBs), SuccessorBBs.end());
375+
SuccessorBBs.erase(std::unique(SuccessorBBs.begin(), SuccessorBBs.end()),
376+
SuccessorBBs.end());
376377

377378
for (BinaryBasicBlock *BB : SuccessorBBs)
378379
addSuccessor(BB);

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,8 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
373373
Streamer.emitLabel(StartSymbol);
374374
}
375375

376-
const bool NeedsFDE =
377-
Function.hasCFI() && !(Function.isPatch() && Function.isAnonymous());
378376
// Emit CFI start
379-
if (NeedsFDE) {
377+
if (Function.hasCFI()) {
380378
Streamer.emitCFIStartProc(/*IsSimple=*/false);
381379
if (Function.getPersonalityFunction() != nullptr)
382380
Streamer.emitCFIPersonality(Function.getPersonalityFunction(),
@@ -423,7 +421,7 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
423421
Streamer.emitBytes(BC.MIB->getTrapFillValue());
424422

425423
// Emit CFI end
426-
if (NeedsFDE)
424+
if (Function.hasCFI())
427425
Streamer.emitCFIEndProc();
428426

429427
MCSymbol *EndSymbol = Function.getFunctionEndLabel(FF.getFragmentNum());

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,7 @@ Error BinaryFunction::buildCFG(MCPlusBuilder::AllocatorIdTy AllocatorId) {
23762376
// Without doing jump table value profiling we don't have a use for extra
23772377
// (duplicate) branches.
23782378
llvm::sort(TakenBranches);
2379-
auto NewEnd = llvm::unique(TakenBranches);
2379+
auto NewEnd = std::unique(TakenBranches.begin(), TakenBranches.end());
23802380
TakenBranches.erase(NewEnd, TakenBranches.end());
23812381

23822382
for (std::pair<uint32_t, uint32_t> &Branch : TakenBranches) {

bolt/lib/Core/DebugNames.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,8 @@ void DWARF5AcceleratorTable::computeBucketCount() {
440440
for (const auto &E : Entries)
441441
Uniques.push_back(E.second.HashValue);
442442
array_pod_sort(Uniques.begin(), Uniques.end());
443-
std::vector<uint32_t>::iterator P = llvm::unique(Uniques);
443+
std::vector<uint32_t>::iterator P =
444+
std::unique(Uniques.begin(), Uniques.end());
444445

445446
UniqueHashCount = std::distance(Uniques.begin(), P);
446447

0 commit comments

Comments
 (0)