Lines Matching refs:opts
72 namespace opts { namespace
311 llvm::find_if(opts::ReorderData, [&](const std::string &SectionName) { in refersToReorderedSection()
314 return Itr != opts::ReorderData.end(); in refersToReorderedSection()
354 nullptr, opts::DWPPathName, in RewriteInstance()
367 if (opts::UpdateDebugSections) in RewriteInstance()
370 if (opts::Instrument) in RewriteInstance()
372 else if (opts::Hugify) in RewriteInstance()
406 if (opts::processAllFunctions()) in shouldDisassemble()
414 TimerGroupDesc, opts::TimeRewrite); in discoverStorage()
473 if (!opts::HeatmapMode && in discoverStorage()
474 !(opts::AggregateOnly && BAT->enabledFor(InputFile)) && in discoverStorage()
494 if (!opts::UseGnuStack) { in discoverStorage()
588 if (opts::PrintSDTMarkers) in parseSDTNotes()
623 if (opts::PrintPseudoProbes == opts::PrintPseudoProbesOptions::PPP_All || in parsePseudoProbe()
624 opts::PrintPseudoProbes == in parsePseudoProbe()
625 opts::PrintPseudoProbesOptions::PPP_Probes_Section_Decode) { in parsePseudoProbe()
738 if (opts::AggregateOnly && BAT->enabledFor(InputFile)) { in run()
757 if (opts::DiffOnly) in run()
766 if (opts::LinuxKernelMode) { in run()
769 } else if (opts::OutputFilename == "/dev/null") { in run()
781 TimerGroupName, TimerGroupDesc, opts::TimeRewrite); in discoverFileObjects()
943 if (opts::Verbosity >= 1 && SymbolType == SymbolRef::ST_Function) in discoverFileObjects()
1020 LLVM_DEBUG(if (opts::Verbosity > 1) { in discoverFileObjects()
1052 } else if (opts::Verbosity > 1) { in discoverFileObjects()
1070 if (opts::Verbosity >= 1) in discoverFileObjects()
1142 if (opts::Verbosity >= 1) { in discoverFileObjects()
1202 if (opts::Verbosity >= 1) in discoverFileObjects()
1244 if (opts::LinuxKernelMode) { in discoverFileObjects()
1499 if (opts::Verbosity >= 1) in adjustFunctionBoundaries()
1562 TimerGroupName, TimerGroupDesc, opts::TimeRewrite); in readSpecialSections()
1586 opts::LinuxKernelMode = true; in readSpecialSections()
1590 if (HasDebugInfo && !opts::UpdateDebugSections && !opts::AggregateOnly) { in readSpecialSections()
1609 if (!opts::HeatmapMode) { in readSpecialSections()
1618 if (opts::PrintSections) { in readSpecialSections()
1623 if (opts::RelocationMode == cl::BOU_TRUE && !HasTextRelocations) { in readSpecialSections()
1630 HasTextRelocations && (opts::RelocationMode != cl::BOU_FALSE); in readSpecialSections()
1633 if (opts::HeatmapMode) in readSpecialSections()
1637 outs() << "BOLT-INFO: enabling " << (opts::StrictMode ? "strict " : "") in readSpecialSections()
1665 if (opts::AlignMacroOpFusion != MFT_NONE && !BC->isX86()) { in adjustCommandLineOptions()
1667 opts::AlignMacroOpFusion = MFT_NONE; in adjustCommandLineOptions()
1678 opts::AlignMacroOpFusion = MFT_NONE; in adjustCommandLineOptions()
1681 if (opts::AlignMacroOpFusion != MFT_NONE && !BC->HasRelocations) { in adjustCommandLineOptions()
1684 opts::AlignMacroOpFusion = MFT_NONE; in adjustCommandLineOptions()
1687 if (opts::SplitEH && !BC->HasRelocations) { in adjustCommandLineOptions()
1689 opts::SplitEH = false; in adjustCommandLineOptions()
1692 if (opts::StrictMode && !BC->HasRelocations) { in adjustCommandLineOptions()
1695 opts::StrictMode = false; in adjustCommandLineOptions()
1698 if (BC->HasRelocations && opts::AggregateOnly && in adjustCommandLineOptions()
1699 !opts::StrictMode.getNumOccurrences()) { in adjustCommandLineOptions()
1702 opts::StrictMode = true; in adjustCommandLineOptions()
1706 opts::AlignMacroOpFusion == MFT_HOT && !ProfileReader) { in adjustCommandLineOptions()
1709 opts::AlignMacroOpFusion = MFT_ALL; in adjustCommandLineOptions()
1713 opts::ReorderFunctions != ReorderFunctions::RT_NONE) { in adjustCommandLineOptions()
1719 if (opts::ReorderFunctions != ReorderFunctions::RT_NONE && in adjustCommandLineOptions()
1720 !opts::HotText.getNumOccurrences()) { in adjustCommandLineOptions()
1721 opts::HotText = true; in adjustCommandLineOptions()
1722 } else if (opts::HotText && !BC->HasRelocations) { in adjustCommandLineOptions()
1724 opts::HotText = false; in adjustCommandLineOptions()
1727 if (opts::HotText && opts::HotTextMoveSections.getNumOccurrences() == 0) { in adjustCommandLineOptions()
1728 opts::HotTextMoveSections.addValue(".stub"); in adjustCommandLineOptions()
1729 opts::HotTextMoveSections.addValue(".mover"); in adjustCommandLineOptions()
1730 opts::HotTextMoveSections.addValue(".never_hugify"); in adjustCommandLineOptions()
1733 if (opts::UseOldText && !BC->OldTextSectionAddress) { in adjustCommandLineOptions()
1736 opts::UseOldText = false; in adjustCommandLineOptions()
1738 if (opts::UseOldText && !BC->HasRelocations) { in adjustCommandLineOptions()
1740 opts::UseOldText = false; in adjustCommandLineOptions()
1743 if (!opts::AlignText.getNumOccurrences()) in adjustCommandLineOptions()
1744 opts::AlignText = BC->PageAlign; in adjustCommandLineOptions()
1746 if (opts::AlignText < opts::AlignFunctions) in adjustCommandLineOptions()
1747 opts::AlignText = (unsigned)opts::AlignFunctions; in adjustCommandLineOptions()
1749 if (BC->isX86() && opts::Lite.getNumOccurrences() == 0 && !opts::StrictMode && in adjustCommandLineOptions()
1750 !opts::UseOldText) in adjustCommandLineOptions()
1751 opts::Lite = true; in adjustCommandLineOptions()
1753 if (opts::Lite && opts::UseOldText) { in adjustCommandLineOptions()
1756 opts::UseOldText = false; in adjustCommandLineOptions()
1759 if (opts::Lite && opts::StrictMode) { in adjustCommandLineOptions()
1764 if (opts::Lite) in adjustCommandLineOptions()
1767 if (!opts::SaveProfile.empty() && BAT->enabledFor(InputFile)) { in adjustCommandLineOptions()
2021 assert(opts::LinuxKernelMode && in processLKSections()
2338 if (opts::Verbosity >= 1) in readRelocations()
2397 if (opts::Verbosity >= 1) in readRelocations()
2544 if (opts::Verbosity > 1 && in readRelocations()
2641 if (opts::MaxDataRelocations && in readRelocations()
2642 NumDataRelocations + 1 == opts::MaxDataRelocations) { in readRelocations()
2649 return (!opts::MaxDataRelocations || in readRelocations()
2650 NumDataRelocations < opts::MaxDataRelocations); in readRelocations()
2654 (opts::ForceToDataRelocations && checkMaxDataRelocations())) in readRelocations()
2681 populateFunctionNames(opts::FunctionNamesFile, opts::ForceFunctionNames); in selectFunctionsToProcess()
2682 populateFunctionNames(opts::SkipFunctionNamesFile, opts::SkipFunctionNames); in selectFunctionsToProcess()
2683 populateFunctionNames(opts::FunctionNamesFileNR, opts::ForceFunctionNamesNR); in selectFunctionsToProcess()
2687 opts::ForceFunctionNamesNR.begin(), opts::ForceFunctionNamesNR.end()); in selectFunctionsToProcess()
2689 if ((!opts::ForceFunctionNames.empty() || in selectFunctionsToProcess()
2690 !opts::ForceFunctionNamesNR.empty()) && in selectFunctionsToProcess()
2691 !opts::SkipFunctionNames.empty()) { in selectFunctionsToProcess()
2698 if (opts::LiteThresholdPct) { in selectFunctionsToProcess()
2699 if (opts::LiteThresholdPct > 100) in selectFunctionsToProcess()
2700 opts::LiteThresholdPct = 100; in selectFunctionsToProcess()
2713 size_t Index = TopFunctions.size() * opts::LiteThresholdPct / 100; in selectFunctionsToProcess()
2721 LiteThresholdExecCount, static_cast<uint64_t>(opts::LiteThresholdCount)); in selectFunctionsToProcess()
2725 if (opts::MaxFunctions && NumFunctionsToProcess > opts::MaxFunctions) in selectFunctionsToProcess()
2729 if (!opts::ForceFunctionNames.empty() || !ForceFunctionsNR.empty()) { in selectFunctionsToProcess()
2731 for (std::string &Name : opts::ForceFunctionNames) in selectFunctionsToProcess()
2743 for (std::string &Name : opts::SkipFunctionNames) in selectFunctionsToProcess()
2747 if (opts::Lite) { in selectFunctionsToProcess()
2774 if (opts::MaxFunctions && NumFunctionsToProcess == opts::MaxFunctions) in selectFunctionsToProcess()
2782 TimerGroupDesc, opts::TimeRewrite); in readDebugInfo()
2783 if (!opts::UpdateDebugSections) in readDebugInfo()
2794 TimerGroupName, TimerGroupDesc, opts::TimeRewrite); in preprocessProfileData()
2809 !opts::AllowStripped) { in preprocessProfileData()
2824 TimerGroupName, TimerGroupDesc, opts::TimeRewrite); in processProfileDataPreCFG()
2835 TimerGroupDesc, opts::TimeRewrite); in processProfileData()
2840 if (!opts::SaveProfile.empty()) { in processProfileData()
2841 YAMLProfileWriter PW(opts::SaveProfile); in processProfileData()
2848 if (opts::AggregateOnly) in processProfileData()
2854 TimerGroupName, TimerGroupDesc, opts::TimeRewrite); in disassembleFunctions()
2878 "Scan Binary Functions", opts::TimeBuild); in disassembleFunctions()
2885 if (opts::processAllFunctions()) in disassembleFunctions()
2889 if (opts::Verbosity >= 1) in disassembleFunctions()
2897 if (opts::PrintAll || opts::PrintDisasm) in disassembleFunctions()
2951 "Build Binary Functions", opts::TimeBuild); in buildFunctionsCFG()
2963 if (opts::PrintAll) { in buildFunctionsCFG()
2976 /*ForceSequential*/ opts::SequentialDisassembly || opts::PrintAll); in buildFunctionsCFG()
2997 if (opts::PrintAll || opts::PrintCFG) in postProcessFunctions()
3000 if (opts::DumpDotAll) in postProcessFunctions()
3003 if (opts::PrintLoopInfo) { in postProcessFunctions()
3012 if (opts::PrintGlobals) { in postProcessFunctions()
3020 TimerGroupName, TimerGroupDesc, opts::TimeRewrite); in runOptimizationPasses()
3089 TimerGroupDesc, opts::TimeRewrite); in emitAndLink()
3110 if (opts::UseOldText || opts::StrictMode) { in emitAndLink()
3164 if (opts::UpdateDebugSections) in emitAndLink()
3193 if (opts::PrintCacheMetrics) { in emitAndLink()
3198 if (opts::KeepTmp) { in emitAndLink()
3212 if (opts::UpdateDebugSections) { in updateMetadata()
3214 TimerGroupDesc, opts::TimeRewrite); in updateMetadata()
3218 if (opts::WriteBoltInfoSection) in updateMetadata()
3289 if (opts::PrintPseudoProbes == opts::PrintPseudoProbesOptions::PPP_All || in updatePseudoProbes()
3290 opts::PrintPseudoProbes == in updatePseudoProbes()
3291 opts::PrintPseudoProbesOptions::PPP_Probes_Address_Conversion) { in updatePseudoProbes()
3461 if (opts::PrintPseudoProbes == opts::PrintPseudoProbesOptions::PPP_All || in encodePseudoProbes()
3462 opts::PrintPseudoProbes == in encodePseudoProbes()
3463 opts::PrintPseudoProbesOptions::PPP_Encoded_Probes) { in encodePseudoProbes()
3480 TimerGroupDesc, opts::TimeRewrite); in updateSDTMarkers()
3506 TimerGroupDesc, opts::TimeRewrite); in updateLKMarkers()
3571 if (opts::HotFunctionsAtEnd) in getCodeSections()
3629 if (opts::HotText) { in mapCodeSections()
3643 if (opts::UseOldText) { in mapCodeSections()
3649 << Twine::utohexstr(opts::AlignText) << " alignment\n"; in mapCodeSections()
3653 << " using 0x" << Twine::utohexstr(opts::AlignText) in mapCodeSections()
3656 opts::UseOldText = false; in mapCodeSections()
3676 if (PaddingSize && !opts::UseOldText) in mapCodeSections()
3710 if (opts::JumpTables == JTS_BASIC) { in mapCodeSections()
3917 if (opts::Instrument) in patchELFPHDRTable()
3944 } else if (opts::UseGnuStack && Phdr.p_type == ELF::PT_GNU_STACK) { in patchELFPHDRTable()
3947 } else if (!opts::UseGnuStack && Phdr.p_type == ELF::PT_DYNAMIC) { in patchELFPHDRTable()
3957 if (!opts::UseGnuStack && !AddedSegment) { in patchELFPHDRTable()
3963 assert((!opts::UseGnuStack || ModdedGnuStack) && in patchELFPHDRTable()
4200 if (isDebugSection(SectionName) && !opts::UpdateDebugSections) in shouldStrip()
4204 if (opts::RemoveSymtab && Section.sh_type == ELF::SHT_SYMTAB) in shouldStrip()
4246 if (opts::Verbosity) in getOutputSections()
4252 if (opts::Verbosity >= 1) in getOutputSections()
4288 if (opts::Verbosity > 1) in getOutputSections()
4336 if (opts::Verbosity >= 1) in getOutputSections()
4653 BinaryData *BD = opts::ReorderData.empty() in updateELFSymbolTable()
4705 if (opts::HotText && in updateELFSymbolTable()
4709 if (opts::HotData && in updateELFSymbolTable()
4779 if (opts::HotText && !NumHotTextSymsUpdated) { in updateELFSymbolTable()
4784 if (opts::HotData && !NumHotDataSymsUpdated) { in updateELFSymbolTable()
4842 if (opts::RemoveSymtab) in patchELFSymTabs()
5229 Out = std::make_unique<ToolOutputFile>(opts::OutputFilename, EC, in rewriteFile()
5260 if (opts::Verbosity >= 1) in rewriteFile()
5269 if (!BC->HasRelocations && opts::JumpTables == JTS_BASIC) { in rewriteFile()
5285 if (opts::Verbosity >= 2) in rewriteFile()
5303 if (opts::MaxFunctions && in rewriteFile()
5304 CountOverwrittenFunctions == opts::MaxFunctions) { in rewriteFile()
5312 if (opts::Verbosity >= 2) in rewriteFile()
5321 if (opts::MaxFunctions && CountOverwrittenFunctions == opts::MaxFunctions) { in rewriteFile()
5340 if (BC->HasRelocations && opts::TrapOldCode) { in rewriteFile()
5359 if (opts::Verbosity >= 1) in rewriteFile()
5379 if (opts::EnableBAT) in rewriteFile()
5393 if (opts::EnableBAT) in rewriteFile()
5410 if (opts::PrintSections) { in rewriteFile()
5416 EC = sys::fs::setPermissions(opts::OutputFilename, sys::fs::perms::all_all); in rewriteFile()