diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-03-22 08:54:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 08:54:11 +0800 |
commit | 8d7d581ad2a96ebe54aed0e5a626048d2e2a8d2d (patch) | |
tree | eae71a2fba4d954b9b9c80e0620064bcc3b647fa /llvm/lib/Passes/PassBuilder.cpp | |
parent | 3e4caa9da4356247444e973eb470a25adae083b0 (diff) | |
download | llvm-8d7d581ad2a96ebe54aed0e5a626048d2e2a8d2d.zip llvm-8d7d581ad2a96ebe54aed0e5a626048d2e2a8d2d.tar.gz llvm-8d7d581ad2a96ebe54aed0e5a626048d2e2a8d2d.tar.bz2 |
Revert "[Passes] Expose parseSinglePassOption" (#86225)
Reverts llvm/llvm-project#86117
Diffstat (limited to 'llvm/lib/Passes/PassBuilder.cpp')
-rw-r--r-- | llvm/lib/Passes/PassBuilder.cpp | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index c5465da..9d98ae7 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -600,9 +600,8 @@ Expected<LoopUnrollOptions> parseLoopUnrollOptions(StringRef Params) { return UnrollOpts; } -Expected<bool> PassBuilder::parseSinglePassOption(StringRef Params, - StringRef OptionName, - StringRef PassName) { +Expected<bool> parseSinglePassOption(StringRef Params, StringRef OptionName, + StringRef PassName) { bool Result = false; while (!Params.empty()) { StringRef ParamName; @@ -621,28 +620,24 @@ Expected<bool> PassBuilder::parseSinglePassOption(StringRef Params, } Expected<bool> parseGlobalDCEPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption( - Params, "vfe-linkage-unit-visibility", "GlobalDCE"); + return parseSinglePassOption(Params, "vfe-linkage-unit-visibility", "GlobalDCE"); } Expected<bool> parseCGProfilePassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "in-lto-post-link", - "CGProfile"); + return parseSinglePassOption(Params, "in-lto-post-link", "CGProfile"); } Expected<bool> parseInlinerPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "only-mandatory", - "InlinerPass"); + return parseSinglePassOption(Params, "only-mandatory", "InlinerPass"); } Expected<bool> parseCoroSplitPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "reuse-storage", - "CoroSplitPass"); + return parseSinglePassOption(Params, "reuse-storage", "CoroSplitPass"); } Expected<bool> parsePostOrderFunctionAttrsPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption( - Params, "skip-non-recursive-function-attrs", "PostOrderFunctionAttrs"); + return parseSinglePassOption(Params, "skip-non-recursive-function-attrs", + "PostOrderFunctionAttrs"); } Expected<CFGuardPass::Mechanism> parseCFGuardPassOptions(StringRef Params) { @@ -666,21 +661,19 @@ Expected<CFGuardPass::Mechanism> parseCFGuardPassOptions(StringRef Params) { } Expected<bool> parseEarlyCSEPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "memssa", "EarlyCSE"); + return parseSinglePassOption(Params, "memssa", "EarlyCSE"); } Expected<bool> parseEntryExitInstrumenterPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "post-inline", - "EntryExitInstrumenter"); + return parseSinglePassOption(Params, "post-inline", "EntryExitInstrumenter"); } Expected<bool> parseLoopExtractorPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "single", "LoopExtractor"); + return parseSinglePassOption(Params, "single", "LoopExtractor"); } Expected<bool> parseLowerMatrixIntrinsicsPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "minimal", - "LowerMatrixIntrinsics"); + return parseSinglePassOption(Params, "minimal", "LowerMatrixIntrinsics"); } Expected<AddressSanitizerOptions> parseASanPassOptions(StringRef Params) { @@ -1020,13 +1013,13 @@ parseStackLifetimeOptions(StringRef Params) { } Expected<bool> parseDependenceAnalysisPrinterOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "normalized-results", - "DependenceAnalysisPrinter"); + return parseSinglePassOption(Params, "normalized-results", + "DependenceAnalysisPrinter"); } Expected<bool> parseSeparateConstOffsetFromGEPPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "lower-gep", - "SeparateConstOffsetFromGEP"); + return parseSinglePassOption(Params, "lower-gep", + "SeparateConstOffsetFromGEP"); } Expected<OptimizationLevel> @@ -1042,13 +1035,13 @@ parseFunctionSimplificationPipelineOptions(StringRef Params) { } Expected<bool> parseMemorySSAPrinterPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "no-ensure-optimized-uses", - "MemorySSAPrinterPass"); + return parseSinglePassOption(Params, "no-ensure-optimized-uses", + "MemorySSAPrinterPass"); } Expected<bool> parseSpeculativeExecutionPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "only-if-divergent-target", - "SpeculativeExecutionPass"); + return parseSinglePassOption(Params, "only-if-divergent-target", + "SpeculativeExecutionPass"); } Expected<std::string> parseMemProfUsePassOptions(StringRef Params) { @@ -1069,13 +1062,13 @@ Expected<std::string> parseMemProfUsePassOptions(StringRef Params) { } Expected<bool> parseStructuralHashPrinterPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "detailed", - "StructuralHashPrinterPass"); + return parseSinglePassOption(Params, "detailed", + "StructuralHashPrinterPass"); } Expected<bool> parseWinEHPrepareOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "demote-catchswitch-only", - "WinEHPreparePass"); + return parseSinglePassOption(Params, "demote-catchswitch-only", + "WinEHPreparePass"); } Expected<GlobalMergeOptions> parseGlobalMergeOptions(StringRef Params) { |