From e5b1d9cd8c8a78b7db0063c5be7a051387d49421 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Thu, 23 May 2019 15:49:36 -0700 Subject: [PATCH] [BOLT][NFC] Fix white space (cherry picked from FBD15485688) --- bolt/src/BinaryBasicBlock.h | 2 +- bolt/src/BinaryData.h | 2 +- bolt/src/BinaryFunction.cpp | 5 ++--- bolt/src/BinarySection.cpp | 2 +- bolt/src/Passes/BinaryPasses.cpp | 4 ++-- bolt/src/Passes/Inliner.h | 4 ++-- bolt/src/Passes/ValidateInternalCalls.cpp | 4 ++-- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/bolt/src/BinaryBasicBlock.h b/bolt/src/BinaryBasicBlock.h index 27a97c97d7f3..fa660f162b65 100644 --- a/bolt/src/BinaryBasicBlock.h +++ b/bolt/src/BinaryBasicBlock.h @@ -459,7 +459,7 @@ public: /// Add a range of instructions to the end of this basic block. template void addInstructions(RangeTy R) { - for(auto &I : R) + for (auto &I : R) addInstruction(I); } diff --git a/bolt/src/BinaryData.h b/bolt/src/BinaryData.h index baf8950b995a..bf8c0c3741cf 100644 --- a/bolt/src/BinaryData.h +++ b/bolt/src/BinaryData.h @@ -106,7 +106,7 @@ public: bool isAtomic() const { return isTopLevelJumpTable() || !Parent; } - + iterator_range::const_iterator> names() const { return make_range(Names.begin(), Names.end()); } diff --git a/bolt/src/BinaryFunction.cpp b/bolt/src/BinaryFunction.cpp index 5a77a1853d74..8cb3998ce5a0 100644 --- a/bolt/src/BinaryFunction.cpp +++ b/bolt/src/BinaryFunction.cpp @@ -1905,7 +1905,6 @@ void BinaryFunction::postProcessCFG() { // Eliminate inconsistencies between branch instructions and CFG. postProcessBranches(); - } calculateMacroOpFusionStats(); @@ -3988,7 +3987,7 @@ DebugAddressRangesVector BinaryFunction::translateInputToOutputRanges( std::sort(OutputRanges.begin(), OutputRanges.end()); DebugAddressRangesVector MergedRanges; PrevEndAddress = 0; - for(const auto &Range : OutputRanges) { + for (const auto &Range : OutputRanges) { if (Range.LowPC <= PrevEndAddress) { MergedRanges.back().HighPC = std::max(MergedRanges.back().HighPC, Range.HighPC); @@ -4125,7 +4124,7 @@ DWARFDebugLoc::LocationList BinaryFunction::translateInputToOutputLocationList( DWARFDebugLoc::LocationList MergedLL; PrevEndAddress = 0; PrevLoc = nullptr; - for(const auto &Entry : OutputLL.Entries) { + for (const auto &Entry : OutputLL.Entries) { if (Entry.Begin <= PrevEndAddress && *PrevLoc == Entry.Loc) { MergedLL.Entries.back().End = std::max(Entry.End, MergedLL.Entries.back().End); diff --git a/bolt/src/BinarySection.cpp b/bolt/src/BinarySection.cpp index 3e163868e54d..9866ed8361f3 100644 --- a/bolt/src/BinarySection.cpp +++ b/bolt/src/BinarySection.cpp @@ -66,7 +66,7 @@ BinarySection::~BinarySection() { delete[] getData(); return; } - + if (!isAllocatable() && (!hasSectionRef() || OutputContents.data() != getContents(Section).data())) { diff --git a/bolt/src/Passes/BinaryPasses.cpp b/bolt/src/Passes/BinaryPasses.cpp index 787bb5599f81..a7e91ae5ee1c 100644 --- a/bolt/src/Passes/BinaryPasses.cpp +++ b/bolt/src/Passes/BinaryPasses.cpp @@ -1513,7 +1513,7 @@ void InlineMemcpy::runOnFunctions(BinaryContext &BC) { uint64_t NumInlinedDyno = 0; for (auto &BFI : BC.getBinaryFunctions()) { for (auto &BB : BFI.second) { - for(auto II = BB.begin(); II != BB.end(); ++II) { + for (auto II = BB.begin(); II != BB.end(); ++II) { auto &Inst = *II; if (!BC.MIB->isCall(Inst) || MCPlus::getNumPrimeOperands(Inst) != 1 || @@ -1614,7 +1614,7 @@ void SpecializeMemcpy1::runOnFunctions(BinaryContext &BC) { std::vector Blocks(Function.pbegin(), Function.pend()); size_t CallSiteID = 0; for (auto *CurBB : Blocks) { - for(auto II = CurBB->begin(); II != CurBB->end(); ++II) { + for (auto II = CurBB->begin(); II != CurBB->end(); ++II) { auto &Inst = *II; if (!BC.MIB->isCall(Inst) || MCPlus::getNumPrimeOperands(Inst) != 1 || diff --git a/bolt/src/Passes/Inliner.h b/bolt/src/Passes/Inliner.h index db6f89195b23..82289f16d6f9 100644 --- a/bolt/src/Passes/Inliner.h +++ b/bolt/src/Passes/Inliner.h @@ -39,7 +39,7 @@ private: : Type(Type) {} }; - + std::unordered_map InliningCandidates; /// Count total amount of bytes inlined for all instances of Inliner. @@ -58,7 +58,7 @@ private: /// Size in bytes of a tail call instruction. static uint64_t SizeOfTailCallInst; - + /// Set of functions modified by inlining (used for printing). std::unordered_set Modified; diff --git a/bolt/src/Passes/ValidateInternalCalls.cpp b/bolt/src/Passes/ValidateInternalCalls.cpp index e56f75d292b9..2b5100ed148f 100644 --- a/bolt/src/Passes/ValidateInternalCalls.cpp +++ b/bolt/src/Passes/ValidateInternalCalls.cpp @@ -95,7 +95,7 @@ public: bool ValidateInternalCalls::fixCFGForPIC(BinaryFunction &Function) const { const BinaryContext &BC = Function.getBinaryContext(); for (auto &BB : Function) { - for(auto II = BB.begin(); II != BB.end(); ++II) { + for (auto II = BB.begin(); II != BB.end(); ++II) { auto &Inst = *II; auto *Target = getInternalCallTarget(Function, Inst); if (!Target || BC.MIB->hasAnnotation(Inst, getProcessedICTag())) @@ -302,7 +302,7 @@ void ValidateInternalCalls::runOnFunctions(BinaryContext &BC) { for (auto &BFI : BC.getBinaryFunctions()) { BinaryFunction &Function = BFI.second; for (auto &BB : Function) { - for(auto &Inst : BB) { + for (auto &Inst : BB) { if (getInternalCallTarget(Function, Inst)) { NeedsValidation.insert(&Function); Function.setSimple(false);