diff options
Diffstat (limited to 'bolt/lib')
-rw-r--r-- | bolt/lib/Core/BinaryContext.cpp | 4 | ||||
-rw-r--r-- | bolt/lib/Core/BinaryFunction.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Core/BinaryFunctionCallGraph.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Core/DIEBuilder.cpp | 6 | ||||
-rw-r--r-- | bolt/lib/Core/DebugData.cpp | 4 | ||||
-rw-r--r-- | bolt/lib/Core/DebugNames.cpp | 4 | ||||
-rw-r--r-- | bolt/lib/Passes/Aligner.cpp | 4 | ||||
-rw-r--r-- | bolt/lib/Passes/FrameAnalysis.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Passes/RegReAssign.cpp | 6 | ||||
-rw-r--r-- | bolt/lib/Passes/ShrinkWrapping.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Passes/SplitFunctions.cpp | 12 | ||||
-rw-r--r-- | bolt/lib/Profile/DataReader.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Rewrite/BuildIDRewriter.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Rewrite/DWARFRewriter.cpp | 6 | ||||
-rw-r--r-- | bolt/lib/Rewrite/PseudoProbeRewriter.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Rewrite/RewriteInstance.cpp | 6 | ||||
-rw-r--r-- | bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp | 6 | ||||
-rw-r--r-- | bolt/lib/Target/X86/X86MCPlusBuilder.cpp | 2 | ||||
-rw-r--r-- | bolt/lib/Utils/CommandLineOpts.cpp | 2 |
19 files changed, 38 insertions, 38 deletions
diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index 206d8eef..46b3372 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -844,7 +844,7 @@ BinaryContext::getOrCreateJumpTable(BinaryFunction &Function, uint64_t Address, auto isSibling = std::bind(&BinaryContext::areRelatedFragments, this, &Function, std::placeholders::_1); assert(llvm::all_of(JT->Parents, isSibling) && - "cannot re-use jump table of a different function"); + "cannot reuse jump table of a different function"); (void)isSibling; if (opts::Verbosity > 2) { this->outs() << "BOLT-INFO: multiple fragments access the same jump table" @@ -860,7 +860,7 @@ BinaryContext::getOrCreateJumpTable(BinaryFunction &Function, uint64_t Address, return JT->getFirstLabel(); } - // Re-use the existing symbol if possible. + // Reuse the existing symbol if possible. MCSymbol *JTLabel = nullptr; if (BinaryData *Object = getBinaryDataAtAddress(Address)) { if (!isInternalSymbolName(Object->getSymbol()->getName())) diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp index 9687892..4dfd4ba 100644 --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -3875,7 +3875,7 @@ uint64_t BinaryFunction::getEntryIDForSymbol(const MCSymbol *Symbol) const { if (FunctionSymbol == Symbol) return 0; - // Check all secondary entries available as either basic blocks or lables. + // Check all secondary entries available as either basic blocks or labels. uint64_t NumEntries = 1; for (const BinaryBasicBlock *BB : BasicBlocks) { MCSymbol *EntrySymbol = getSecondaryEntryPointSymbol(*BB); diff --git a/bolt/lib/Core/BinaryFunctionCallGraph.cpp b/bolt/lib/Core/BinaryFunctionCallGraph.cpp index f0c46a8..af22419 100644 --- a/bolt/lib/Core/BinaryFunctionCallGraph.cpp +++ b/bolt/lib/Core/BinaryFunctionCallGraph.cpp @@ -122,7 +122,7 @@ buildCallGraph(BinaryContext &BC, CgFilterFunction Filter, bool CgFromPerfData, // create a node for a function unless it was the target of a call from // a hot block. The alternative would be to set the count to one or // accumulate the number of calls from the callsite into the function - // samples. Results from perfomance testing seem to favor the zero + // samples. Results from performance testing seem to favor the zero // count though, so I'm leaving it this way for now. return Cg.addNode(Function, Size, Function->getKnownExecutionCount()); } diff --git a/bolt/lib/Core/DIEBuilder.cpp b/bolt/lib/Core/DIEBuilder.cpp index 7ce55f9..5b628f6 100644 --- a/bolt/lib/Core/DIEBuilder.cpp +++ b/bolt/lib/Core/DIEBuilder.cpp @@ -137,7 +137,7 @@ void DIEBuilder::updateReferences() { DIEInteger(NewAddr)); } - // Handling referenes in location expressions. + // Handling references in location expressions. for (LocWithReference &LocExpr : getState().LocWithReferencesToProcess) { SmallVector<uint8_t, 32> Buffer; DataExtractor Data(StringRef((const char *)LocExpr.BlockData.data(), @@ -336,7 +336,7 @@ void DIEBuilder::buildCompileUnits(const bool Init) { registerUnit(*DU, false); } - // Using DULIst since it can be modified by cross CU refrence resolution. + // Using DULIst since it can be modified by cross CU reference resolution. for (DWARFUnit *DU : getState().DUList) { if (DU->isTypeUnit()) continue; @@ -508,7 +508,7 @@ void DIEBuilder::finish() { UnitStartOffset += CurUnitInfo.UnitLength; }; // Computing offsets for .debug_types section. - // It's processed first when CU is registered so will be at the begginnig of + // It's processed first when CU is registered so will be at the beginning of // the vector. uint64_t TypeUnitStartOffset = 0; for (DWARFUnit *CU : getState().DUList) { diff --git a/bolt/lib/Core/DebugData.cpp b/bolt/lib/Core/DebugData.cpp index e05f28f..24a4c85 100644 --- a/bolt/lib/Core/DebugData.cpp +++ b/bolt/lib/Core/DebugData.cpp @@ -876,7 +876,7 @@ void DebugStrOffsetsWriter::finalizeSection(DWARFUnit &Unit, DIEValue StrListBaseAttrInfo = Die.findAttribute(dwarf::DW_AT_str_offsets_base); auto RetVal = ProcessedBaseOffsets.find(*Val); - // Handling re-use of str-offsets section. + // Handling reuse of str-offsets section. if (RetVal == ProcessedBaseOffsets.end() || StrOffsetSectionWasModified) { initialize(Unit); // Update String Offsets that were modified. @@ -1167,7 +1167,7 @@ void DwarfLineTable::emitCU(MCStreamer *MCOS, MCDwarfLineTableParams Params, // For functions that we do not modify we output them as raw data. // Re-constructing .debug_line_str so that offsets are correct for those // debug line tables. -// Bonus is that when we output a final binary we can re-use .debug_line_str +// Bonus is that when we output a final binary we can reuse .debug_line_str // section. So we don't have to do the SHF_ALLOC trick we did with // .debug_line. static void parseAndPopulateDebugLineStr(BinarySection &LineStrSection, diff --git a/bolt/lib/Core/DebugNames.cpp b/bolt/lib/Core/DebugNames.cpp index a9d98a6..6be2c5a 100644 --- a/bolt/lib/Core/DebugNames.cpp +++ b/bolt/lib/Core/DebugNames.cpp @@ -55,7 +55,7 @@ DWARF5AcceleratorTable::DWARF5AcceleratorTable( llvm::hash_value(llvm::StringRef(CStr)), StrOffset); if (!R.second) BC.errs() - << "BOLT-WARNING: [internal-dwarf-error]: collision occured on " + << "BOLT-WARNING: [internal-dwarf-error]: collision occurred on " << CStr << " at offset : 0x" << Twine::utohexstr(StrOffset) << ". Previous string offset is: 0x" << Twine::utohexstr(R.first->second) << ".\n"; @@ -86,7 +86,7 @@ void DWARF5AcceleratorTable::addUnit(DWARFUnit &Unit, if (Unit.isTypeUnit()) { if (DWOID) { // We adding an entry for a DWO TU. The DWO CU might not have any entries, - // so need to add it to the list pre-emptively. + // so need to add it to the list preemptively. auto Iter = CUOffsetsToPatch.insert({*DWOID, CUList.size()}); if (Iter.second) CUList.push_back(BADCUOFFSET); diff --git a/bolt/lib/Passes/Aligner.cpp b/bolt/lib/Passes/Aligner.cpp index c3ddeda..5d21bdb 100644 --- a/bolt/lib/Passes/Aligner.cpp +++ b/bolt/lib/Passes/Aligner.cpp @@ -60,7 +60,7 @@ namespace llvm { namespace bolt { // Align function to the specified byte-boundary (typically, 64) offsetting -// the fuction by not more than the corresponding value +// the function by not more than the corresponding value static void alignMaxBytes(BinaryFunction &Function) { Function.setAlignment(opts::AlignFunctions); Function.setMaxAlignmentBytes(opts::AlignFunctionsMaxBytes); @@ -68,7 +68,7 @@ static void alignMaxBytes(BinaryFunction &Function) { } // Align function to the specified byte-boundary (typically, 64) offsetting -// the fuction by not more than the minimum over +// the function by not more than the minimum over // -- the size of the function // -- the specified number of bytes static void alignCompact(BinaryFunction &Function, diff --git a/bolt/lib/Passes/FrameAnalysis.cpp b/bolt/lib/Passes/FrameAnalysis.cpp index f568039..0b26da3 100644 --- a/bolt/lib/Passes/FrameAnalysis.cpp +++ b/bolt/lib/Passes/FrameAnalysis.cpp @@ -198,7 +198,7 @@ public: if (CFIStack.empty()) dbgs() << "Assertion is about to fail: " << BF.getPrintName() << "\n"; assert(!CFIStack.empty() && "Corrupt CFI stack"); - std::pair<int64_t, uint16_t> &Elem = CFIStack.top(); + std::pair<int64_t, uint16_t> Elem = CFIStack.top(); CFIStack.pop(); CfaOffset = Elem.first; CfaReg = Elem.second; diff --git a/bolt/lib/Passes/RegReAssign.cpp b/bolt/lib/Passes/RegReAssign.cpp index 60349f1..0859cd2 100644 --- a/bolt/lib/Passes/RegReAssign.cpp +++ b/bolt/lib/Passes/RegReAssign.cpp @@ -145,7 +145,7 @@ void RegReAssign::rankRegisters(BinaryFunction &Function) { const bool CannotUseREX = BC.MIB->cannotUseREX(Inst); const MCInstrDesc &Desc = BC.MII->get(Inst.getOpcode()); - // Disallow substituitions involving regs in implicit uses lists + // Disallow substitutions involving regs in implicit uses lists for (MCPhysReg ImplicitUse : Desc.implicit_uses()) { const size_t RegEC = BC.MIB->getAliases(ImplicitUse, false).find_first(); @@ -153,7 +153,7 @@ void RegReAssign::rankRegisters(BinaryFunction &Function) { std::numeric_limits<decltype(RegScore)::value_type>::min(); } - // Disallow substituitions involving regs in implicit defs lists + // Disallow substitutions involving regs in implicit defs lists for (MCPhysReg ImplicitDef : Desc.implicit_defs()) { const size_t RegEC = BC.MIB->getAliases(ImplicitDef, false).find_first(); @@ -174,7 +174,7 @@ void RegReAssign::rankRegisters(BinaryFunction &Function) { if (RegEC == 0) continue; - // Disallow substituitions involving regs in instrs that cannot use REX + // Disallow substitutions involving regs in instrs that cannot use REX // The relationship of X86 registers is shown in the diagram. BL and BH // do not have a direct alias relationship. However, if the BH register // cannot be swapped, then the BX/EBX/RBX registers cannot be swapped as diff --git a/bolt/lib/Passes/ShrinkWrapping.cpp b/bolt/lib/Passes/ShrinkWrapping.cpp index 4ea60f3..fe342cc 100644 --- a/bolt/lib/Passes/ShrinkWrapping.cpp +++ b/bolt/lib/Passes/ShrinkWrapping.cpp @@ -402,7 +402,7 @@ void StackLayoutModifier::classifyCFIs() { break; case MCCFIInstruction::OpRestoreState: { assert(!CFIStack.empty() && "Corrupt CFI stack"); - std::pair<int64_t, uint16_t> &Elem = CFIStack.top(); + std::pair<int64_t, uint16_t> Elem = CFIStack.top(); CFIStack.pop(); CfaOffset = Elem.first; CfaReg = Elem.second; diff --git a/bolt/lib/Passes/SplitFunctions.cpp b/bolt/lib/Passes/SplitFunctions.cpp index eab669b..66a373a 100644 --- a/bolt/lib/Passes/SplitFunctions.cpp +++ b/bolt/lib/Passes/SplitFunctions.cpp @@ -386,7 +386,7 @@ private: } /// Compute sum of scores over jumps within \p BlockOrder given \p SplitIndex. - /// Increament Score.LocalScore in place by the sum. + /// Increment Score.LocalScore in place by the sum. void computeJumpScore(const BasicBlockOrder &BlockOrder, const size_t SplitIndex, SplitScore &Score) { @@ -413,7 +413,7 @@ private: } /// Compute sum of scores over calls originated in the current function - /// given \p SplitIndex. Increament Score.LocalScore in place by the sum. + /// given \p SplitIndex. Increment Score.LocalScore in place by the sum. void computeLocalCallScore(const BasicBlockOrder &BlockOrder, const size_t SplitIndex, SplitScore &Score) { if (opts::CallScale == 0) @@ -455,7 +455,7 @@ private: } /// Compute sum of splitting scores for cover calls of the input function. - /// Increament Score.CoverCallScore in place by the sum. + /// Increment Score.CoverCallScore in place by the sum. void computeCoverCallScore(const BasicBlockOrder &BlockOrder, const size_t SplitIndex, const std::vector<CallInfo> &CoverCalls, @@ -467,7 +467,7 @@ private: assert(CI.Length >= Score.HotSizeReduction && "Length of cover calls must exceed reduced size of hot fragment."); // Compute the new length of the call, which is shorter than the original - // one by the size of the splitted fragment minus the total size increase. + // one by the size of the split fragment minus the total size increase. const size_t NewCallLength = CI.Length - Score.HotSizeReduction; Score.CoverCallScore += computeCallScore(CI.Count, NewCallLength); } @@ -502,12 +502,12 @@ private: // First part of LocalScore is the sum over call edges originated in the // input function. These edges can get shorter or longer depending on - // SplitIndex. Score.LocalScore is increamented in place. + // SplitIndex. Score.LocalScore is incremented in place. computeLocalCallScore(BlockOrder, SplitIndex, Score); // Second part of LocalScore is the sum over jump edges with src basic block // and dst basic block in the current function. Score.LocalScore is - // increamented in place. + // incremented in place. computeJumpScore(BlockOrder, SplitIndex, Score); // Compute CoverCallScore and store in Score in place. diff --git a/bolt/lib/Profile/DataReader.cpp b/bolt/lib/Profile/DataReader.cpp index afe2421..277d4bb 100644 --- a/bolt/lib/Profile/DataReader.cpp +++ b/bolt/lib/Profile/DataReader.cpp @@ -907,7 +907,7 @@ ErrorOr<uint64_t> DataReader::parseHexField(char EndChar, bool EndNl) { StringRef NumStr = NumStrRes.get(); uint64_t Num; if (NumStr.getAsInteger(16, Num)) { - reportError("expected hexidecimal number"); + reportError("expected hexadecimal number"); Diag << "Found: " << NumStr << "\n"; return make_error_code(llvm::errc::io_error); } diff --git a/bolt/lib/Rewrite/BuildIDRewriter.cpp b/bolt/lib/Rewrite/BuildIDRewriter.cpp index d50416f..706a3d0 100644 --- a/bolt/lib/Rewrite/BuildIDRewriter.cpp +++ b/bolt/lib/Rewrite/BuildIDRewriter.cpp @@ -48,7 +48,7 @@ public: }; Error BuildIDRewriter::sectionInitializer() { - // Typically, build ID will reside in .note.gnu.build-id section. Howerver, + // Typically, build ID will reside in .note.gnu.build-id section. However, // a linker script can change the section name and such is the case with // the Linux kernel. Hence, we iterate over all note sections. for (BinarySection &NoteSection : BC.sections()) { diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp index 7366d2a..a7a4b66 100644 --- a/bolt/lib/Rewrite/DWARFRewriter.cpp +++ b/bolt/lib/Rewrite/DWARFRewriter.cpp @@ -1723,7 +1723,7 @@ StringRef getSectionName(const SectionRef &Section) { return Name; } -// Exctracts an appropriate slice if input is DWP. +// Extracts an appropriate slice if input is DWP. // Applies patches or overwrites the section. std::optional<StringRef> updateDebugData( DWARFContext &DWCtx, StringRef SectionName, StringRef SectionContents, @@ -1759,7 +1759,7 @@ std::optional<StringRef> updateDebugData( auto Iter = OverridenSections.find(Kind); if (Iter == OverridenSections.end()) { errs() - << "BOLT-WARNING: [internal-dwarf-error]: Could not find overriden " + << "BOLT-WARNING: [internal-dwarf-error]: Could not find overridden " "section for: " << Twine::utohexstr(DWOId) << ".\n"; return std::nullopt; @@ -1991,7 +1991,7 @@ void DWARFRewriter::convertToRangesPatchDebugInfo( } } - // HighPC was conveted into DW_AT_ranges. + // HighPC was converted into DW_AT_ranges. // For DWARF5 we only access ranges through index. DIEBldr.replaceValue(&Die, HighPCAttrInfo.getAttribute(), dwarf::DW_AT_ranges, diff --git a/bolt/lib/Rewrite/PseudoProbeRewriter.cpp b/bolt/lib/Rewrite/PseudoProbeRewriter.cpp index ee021fe..947d899 100644 --- a/bolt/lib/Rewrite/PseudoProbeRewriter.cpp +++ b/bolt/lib/Rewrite/PseudoProbeRewriter.cpp @@ -308,7 +308,7 @@ void PseudoProbeRewriter::encodePseudoProbes() { Contents.append(OSE.str().begin(), OSE.str().end()); }; - // Emit indiviual pseudo probes in a inline tree node + // Emit individual pseudo probes in a inline tree node // Probe index, type, attribute, address type and address are encoded // Address of the first probe is absolute. // Other probes' address are represented by delta diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index a0e7995..9580163 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -1087,7 +1087,7 @@ void RewriteInstance::discoverFileObjects() { if (SymbolAddress == Section->getAddress() + Section->getSize()) { assert(SymbolSize == 0 && - "unexpect non-zero sized symbol at end of section"); + "unexpected non-zero sized symbol at end of section"); LLVM_DEBUG( dbgs() << "BOLT-DEBUG: rejecting as symbol points to end of its section\n"); @@ -2440,7 +2440,7 @@ void RewriteInstance::processDynamicRelocations() { } // The rest of dynamic relocations - DT_RELA. - // The static executable might have .rela.dyn secion and not have PT_DYNAMIC + // The static executable might have .rela.dyn section and not have PT_DYNAMIC if (!DynamicRelocationsSize && BC->IsStaticExecutable) { ErrorOr<BinarySection &> DynamicRelSectionOrErr = BC->getUniqueSectionByName(getRelaDynSectionName()); @@ -5017,7 +5017,7 @@ void RewriteInstance::updateELFSymbolTable( if (!Section) return false; - // Remove the section symbol iif the corresponding section was stripped. + // Remove the section symbol if the corresponding section was stripped. if (Symbol.getType() == ELF::STT_SECTION) { if (!getNewSectionIndex(Symbol.st_shndx)) return true; diff --git a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp index df4f421..6954cb2 100644 --- a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp +++ b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp @@ -1296,7 +1296,7 @@ public: AArch64_AM::ShiftExtendType ExtendType = AArch64_AM::getArithExtendType(OperandExtension); if (ShiftVal != 2) { - // TODO: Handle the patten where ShiftVal != 2. + // TODO: Handle the pattern where ShiftVal != 2. // The following code sequence below has no shift amount, // the range could be 0 to 4. // The pattern comes from libc, it occurs when the binary is static. @@ -1626,7 +1626,7 @@ public: int getUncondBranchEncodingSize() const override { return 28; } // This helper function creates the snippet of code that compares a register - // RegNo with an immedaite Imm, and jumps to Target if they are equal. + // RegNo with an immediate Imm, and jumps to Target if they are equal. // cmp RegNo, #Imm // b.eq Target // where cmp is an alias for subs, which results in the code below: @@ -1648,7 +1648,7 @@ public: } // This helper function creates the snippet of code that compares a register - // RegNo with an immedaite Imm, and jumps to Target if they are not equal. + // RegNo with an immediate Imm, and jumps to Target if they are not equal. // cmp RegNo, #Imm // b.ne Target // where cmp is an alias for subs, which results in the code below: diff --git a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp index 9026a9d..5fca5e8 100644 --- a/bolt/lib/Target/X86/X86MCPlusBuilder.cpp +++ b/bolt/lib/Target/X86/X86MCPlusBuilder.cpp @@ -2715,7 +2715,7 @@ public: bool FoundOne = false; - // Iterate only through src operands that arent also dest operands + // Iterate only through src operands that aren't also dest operands for (unsigned Index = InstDesc.getNumDefs() + (HasLHS ? 1 : 0), E = InstDesc.getNumOperands(); Index != E; ++Index) { diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index 095612a..5be04d2 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -285,7 +285,7 @@ cl::opt<bool> TimeRewrite("time-rewrite", cl::opt<bool> UseOldText( "use-old-text", - cl::desc("re-use space in old .text if possible (relocation mode)"), + cl::desc("reuse space in old .text if possible (relocation mode)"), cl::cat(BoltCategory)); cl::opt<bool> UpdateDebugSections( |