Skip to content

Commit be6d59b

Browse files
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.7 [skip ci]
2 parents 42c88b6 + d09b505 commit be6d59b

File tree

1,467 files changed

+279903
-19256
lines changed

Some content is hidden

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

1,467 files changed

+279903
-19256
lines changed

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -781,11 +781,6 @@ class BinaryContext {
781781
uint64_t PseudoProbeLooseMatchedSampleCount{0};
782782
/// the count of call matched samples
783783
uint64_t CallMatchedSampleCount{0};
784-
/// the number of stale functions that have matching number of blocks in
785-
/// the profile
786-
uint64_t NumStaleFuncsWithEqualBlockCount{0};
787-
/// the number of blocks that have matching size but a differing hash
788-
uint64_t NumStaleBlocksWithEqualIcount{0};
789784
} Stats;
790785

791786
// Original binary execution count stats.

bolt/include/bolt/Passes/MarkRAStates.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313
#define BOLT_PASSES_MARK_RA_STATES
1414

1515
#include "bolt/Passes/BinaryPasses.h"
16+
#include <mutex>
1617

1718
namespace llvm {
1819
namespace bolt {
1920

2021
class MarkRAStates : public BinaryFunctionPass {
22+
// setIgnored() is not thread-safe, but the pass is running on functions in
23+
// parallel.
24+
std::mutex IgnoreMutex;
25+
2126
public:
2227
explicit MarkRAStates() : BinaryFunctionPass(false) {}
2328

bolt/lib/Passes/BinaryPasses.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,12 +1508,6 @@ Error PrintProgramStats::runOnFunctions(BinaryContext &BC) {
15081508
if (NumAllStaleFunctions) {
15091509
const float PctStale =
15101510
NumAllStaleFunctions / (float)NumAllProfiledFunctions * 100.0f;
1511-
const float PctStaleFuncsWithEqualBlockCount =
1512-
(float)BC.Stats.NumStaleFuncsWithEqualBlockCount /
1513-
NumAllStaleFunctions * 100.0f;
1514-
const float PctStaleBlocksWithEqualIcount =
1515-
(float)BC.Stats.NumStaleBlocksWithEqualIcount /
1516-
BC.Stats.NumStaleBlocks * 100.0f;
15171511
auto printErrorOrWarning = [&]() {
15181512
if (PctStale > opts::StaleThreshold)
15191513
BC.errs() << "BOLT-ERROR: ";
@@ -1536,17 +1530,6 @@ Error PrintProgramStats::runOnFunctions(BinaryContext &BC) {
15361530
<< "%) belong to functions with invalid"
15371531
" (possibly stale) profile.\n";
15381532
}
1539-
BC.outs() << "BOLT-INFO: " << BC.Stats.NumStaleFuncsWithEqualBlockCount
1540-
<< " stale function"
1541-
<< (BC.Stats.NumStaleFuncsWithEqualBlockCount == 1 ? "" : "s")
1542-
<< format(" (%.1f%% of all stale)",
1543-
PctStaleFuncsWithEqualBlockCount)
1544-
<< " have matching block count.\n";
1545-
BC.outs() << "BOLT-INFO: " << BC.Stats.NumStaleBlocksWithEqualIcount
1546-
<< " stale block"
1547-
<< (BC.Stats.NumStaleBlocksWithEqualIcount == 1 ? "" : "s")
1548-
<< format(" (%.1f%% of all stale)", PctStaleBlocksWithEqualIcount)
1549-
<< " have matching icount.\n";
15501533
if (PctStale > opts::StaleThreshold) {
15511534
return createFatalBOLTError(
15521535
Twine("BOLT-ERROR: stale functions exceed specified threshold of ") +

bolt/lib/Passes/MarkRAStates.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ bool MarkRAStates::runOnFunction(BinaryFunction &BF) {
4343
// Not all functions have .cfi_negate_ra_state in them. But if one does,
4444
// we expect psign/pauth instructions to have the hasNegateRAState
4545
// annotation.
46-
BF.setIgnored();
4746
BC.outs() << "BOLT-INFO: inconsistent RAStates in function "
4847
<< BF.getPrintName()
4948
<< ": ptr sign/auth inst without .cfi_negate_ra_state\n";
49+
std::lock_guard<std::mutex> Lock(IgnoreMutex);
50+
BF.setIgnored();
5051
return false;
5152
}
5253
}
@@ -67,6 +68,7 @@ bool MarkRAStates::runOnFunction(BinaryFunction &BF) {
6768
BC.outs() << "BOLT-INFO: inconsistent RAStates in function "
6869
<< BF.getPrintName()
6970
<< ": ptr signing inst encountered in Signed RA state\n";
71+
std::lock_guard<std::mutex> Lock(IgnoreMutex);
7072
BF.setIgnored();
7173
return false;
7274
}
@@ -80,6 +82,7 @@ bool MarkRAStates::runOnFunction(BinaryFunction &BF) {
8082
<< BF.getPrintName()
8183
<< ": ptr authenticating inst encountered in Unsigned RA "
8284
"state\n";
85+
std::lock_guard<std::mutex> Lock(IgnoreMutex);
8386
BF.setIgnored();
8487
return false;
8588
}

bolt/lib/Profile/YAMLProfileReader.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,6 @@ bool YAMLProfileReader::parseFunctionProfile(
350350
<< MismatchedCalls << " calls, and " << MismatchedEdges
351351
<< " edges in profile did not match function " << BF << '\n';
352352

353-
if (YamlBF.NumBasicBlocks != BF.size())
354-
++BC.Stats.NumStaleFuncsWithEqualBlockCount;
355-
356353
if (!opts::InferStaleProfile)
357354
return false;
358355
ArrayRef<ProbeMatchSpec> ProbeMatchSpecs;

bolt/test/X86/dwarf4-ftypes-dwp-input-dwo-output.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# UNSUPPORTED: system-linux
21
; RUN: rm -rf %t
32
; RUN: mkdir %t
43
; RUN: cd %t

clang-tools-extra/clang-tidy/ClangTidyModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class ClangTidyCheckFactories {
8585
/// them a prefixed name.
8686
class ClangTidyModule {
8787
public:
88-
virtual ~ClangTidyModule() {}
88+
virtual ~ClangTidyModule() = default;
8989

9090
/// Implement this function in order to register all \c CheckFactories
9191
/// belonging to this module.

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ ClangTidyOptions ClangTidyOptions::getDefaults() {
247247
Options.WarningsAsErrors = "";
248248
Options.HeaderFileExtensions = {"", "h", "hh", "hpp", "hxx"};
249249
Options.ImplementationFileExtensions = {"c", "cc", "cpp", "cxx"};
250-
Options.HeaderFilterRegex = "";
250+
Options.HeaderFilterRegex = ".*";
251251
Options.ExcludeHeaderFilterRegex = "";
252252
Options.SystemHeaders = false;
253253
Options.FormatStyle = "none";

clang-tools-extra/clang-tidy/ClangTidyOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class ClangTidyOptionsProvider {
171171
static const char OptionsSourceTypeCheckCommandLineOption[];
172172
static const char OptionsSourceTypeConfigCommandLineOption[];
173173

174-
virtual ~ClangTidyOptionsProvider() {}
174+
virtual ~ClangTidyOptionsProvider() = default;
175175

176176
/// Returns global options, which are independent of the file.
177177
virtual const ClangTidyGlobalOptions &getGlobalOptions() = 0;

clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ExpandModularHeadersPPCallbacks : public PPCallbacks {
4444
ExpandModularHeadersPPCallbacks(
4545
CompilerInstance *CI,
4646
IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS);
47-
~ExpandModularHeadersPPCallbacks();
47+
~ExpandModularHeadersPPCallbacks() override;
4848

4949
/// Returns the preprocessor that provides callbacks for the whole
5050
/// translation unit, including the main file, textual headers, and modular

0 commit comments

Comments
 (0)