Skip to content

Commit e65259b

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.4 [skip ci]
2 parents 4689649 + 8f31c6d commit e65259b

File tree

5 files changed

+18
-31
lines changed

5 files changed

+18
-31
lines changed

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,8 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
12121212
ErrorOr<StringRef> TypeOrErr = parseString(FieldSeparator);
12131213
if (std::error_code EC = TypeOrErr.getError())
12141214
return EC;
1215-
enum TType { TRACE, BRANCH, FT, FT_EXTERNAL_ORIGIN, INVALID };
1216-
auto Type = StringSwitch<TType>(TypeOrErr.get())
1215+
enum AggregatedLBREntry { TRACE, BRANCH, FT, FT_EXTERNAL_ORIGIN, INVALID };
1216+
auto Type = StringSwitch<AggregatedLBREntry>(TypeOrErr.get())
12171217
.Case("T", TRACE)
12181218
.Case("B", BRANCH)
12191219
.Case("F", FT)
@@ -1237,7 +1237,7 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
12371237
return EC;
12381238

12391239
ErrorOr<Location> TraceFtEnd = std::error_code();
1240-
if (Type == TRACE) {
1240+
if (Type == AggregatedLBREntry::TRACE) {
12411241
while (checkAndConsumeFS()) {
12421242
}
12431243
TraceFtEnd = parseLocationOrOffset();
@@ -1247,12 +1247,13 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
12471247

12481248
while (checkAndConsumeFS()) {
12491249
}
1250-
ErrorOr<int64_t> Frequency = parseNumberField(FieldSeparator, Type != BRANCH);
1250+
ErrorOr<int64_t> Frequency =
1251+
parseNumberField(FieldSeparator, Type != AggregatedLBREntry::BRANCH);
12511252
if (std::error_code EC = Frequency.getError())
12521253
return EC;
12531254

12541255
uint64_t Mispreds = 0;
1255-
if (Type == BRANCH) {
1256+
if (Type == AggregatedLBREntry::BRANCH) {
12561257
while (checkAndConsumeFS()) {
12571258
}
12581259
ErrorOr<int64_t> MispredsOrErr = parseNumberField(FieldSeparator, true);

clang-tools-extra/modularize/Modularize.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,8 @@ struct Location {
406406
}
407407

408408
friend bool operator<(const Location &X, const Location &Y) {
409-
if (X.File != Y.File)
410-
return X.File < Y.File;
411-
if (X.Line != Y.Line)
412-
return X.Line < Y.Line;
413-
return X.Column < Y.Column;
409+
return std::tie(X.File, X.Line, X.Column) <
410+
std::tie(Y.File, Y.Line, Y.Column);
414411
}
415412
friend bool operator>(const Location &X, const Location &Y) { return Y < X; }
416413
friend bool operator<=(const Location &X, const Location &Y) {

clang-tools-extra/modularize/PreprocessorTracker.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -494,19 +494,8 @@ class PPItemKey {
494494
return Column == Other.Column;
495495
}
496496
bool operator<(const PPItemKey &Other) const {
497-
if (Name < Other.Name)
498-
return true;
499-
else if (Name > Other.Name)
500-
return false;
501-
if (File < Other.File)
502-
return true;
503-
else if (File > Other.File)
504-
return false;
505-
if (Line < Other.Line)
506-
return true;
507-
else if (Line > Other.Line)
508-
return false;
509-
return Column < Other.Column;
497+
return std::tie(Name, File, Line, Column) <
498+
std::tie(Other.Name, Other.File, Other.Line, Other.Column);
510499
}
511500
StringHandle Name;
512501
HeaderHandle File;

lldb/source/Target/RegisterContextUnwind.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ void RegisterContextUnwind::InitializeZerothFrame() {
279279
call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(
280280
process->GetTarget(), m_thread);
281281

282-
if (call_site_unwind_plan.get() != nullptr) {
282+
if (call_site_unwind_plan != nullptr) {
283283
m_fallback_unwind_plan_sp = call_site_unwind_plan;
284284
if (TryFallbackUnwindPlan())
285285
cfa_status = true;
@@ -1722,10 +1722,10 @@ RegisterContextUnwind::SavedLocationForRegister(
17221722
// tricky frame and our usual techniques can continue to be used.
17231723

17241724
bool RegisterContextUnwind::TryFallbackUnwindPlan() {
1725-
if (m_fallback_unwind_plan_sp.get() == nullptr)
1725+
if (m_fallback_unwind_plan_sp == nullptr)
17261726
return false;
17271727

1728-
if (m_full_unwind_plan_sp.get() == nullptr)
1728+
if (m_full_unwind_plan_sp == nullptr)
17291729
return false;
17301730

17311731
if (m_full_unwind_plan_sp.get() == m_fallback_unwind_plan_sp.get() ||
@@ -1773,7 +1773,7 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
17731773
// fallback UnwindPlan. We checked if m_fallback_unwind_plan_sp was nullptr
17741774
// at the top -- the only way it became nullptr since then is via
17751775
// SavedLocationForRegister().
1776-
if (m_fallback_unwind_plan_sp.get() == nullptr)
1776+
if (m_fallback_unwind_plan_sp == nullptr)
17771777
return true;
17781778

17791779
// Switch the full UnwindPlan to be the fallback UnwindPlan. If we decide
@@ -1862,10 +1862,10 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
18621862
}
18631863

18641864
bool RegisterContextUnwind::ForceSwitchToFallbackUnwindPlan() {
1865-
if (m_fallback_unwind_plan_sp.get() == nullptr)
1865+
if (m_fallback_unwind_plan_sp == nullptr)
18661866
return false;
18671867

1868-
if (m_full_unwind_plan_sp.get() == nullptr)
1868+
if (m_full_unwind_plan_sp == nullptr)
18691869
return false;
18701870

18711871
if (m_full_unwind_plan_sp.get() == m_fallback_unwind_plan_sp.get() ||

llvm/docs/MLGO.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ requiring no out of tree build-time dependencies.
161161

162162
- ``InteractiveModelRunner``. This is intended for training scenarios where the
163163
training algorithm drives compilation. This model runner has no special
164-
dependencies, and relies on I/O pipes to communicate with a separate process
165-
- presumably a python training algorithm. We do not envision using this in a
164+
dependencies, and relies on I/O pipes to communicate with a separate process,
165+
presumably a python training algorithm. We do not envision using this in a
166166
production environment.
167167

168168
Note that training leaves it to the training infrastructure to handle

0 commit comments

Comments
 (0)