diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-01-18 20:09:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 20:09:53 +0800 |
commit | a48c1bda74038c81c19e4508fb1d1e84f3ae690a (patch) | |
tree | 2e0cf6169bf6d2aed8741c6b19cdd4b370ca3b64 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
parent | d12dffacaa838cbdd30454e49214f40d2ec1cc50 (diff) | |
download | llvm-a48c1bda74038c81c19e4508fb1d1e84f3ae690a.zip llvm-a48c1bda74038c81c19e4508fb1d1e84f3ae690a.tar.gz llvm-a48c1bda74038c81c19e4508fb1d1e84f3ae690a.tar.bz2 |
Revert "[CodeGen] Support start/stop in CodeGenPassBuilder" (#78567)
Reverts llvm/llvm-project#70912. This breaks some bazel tests.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 52cf6b84..3bbc792 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -609,40 +609,6 @@ void llvm::registerCodeGenCallback(PassInstrumentationCallbacks &PIC, registerPartialPipelineCallback(PIC, LLVMTM); } -Expected<TargetPassConfig::StartStopInfo> -TargetPassConfig::getStartStopInfo(PassInstrumentationCallbacks &PIC) { - auto [StartBefore, StartBeforeInstanceNum] = - getPassNameAndInstanceNum(StartBeforeOpt); - auto [StartAfter, StartAfterInstanceNum] = - getPassNameAndInstanceNum(StartAfterOpt); - auto [StopBefore, StopBeforeInstanceNum] = - getPassNameAndInstanceNum(StopBeforeOpt); - auto [StopAfter, StopAfterInstanceNum] = - getPassNameAndInstanceNum(StopAfterOpt); - - if (!StartBefore.empty() && !StartAfter.empty()) - return make_error<StringError>( - Twine(StartBeforeOptName) + " and " + StartAfterOptName + " specified!", - std::make_error_code(std::errc::invalid_argument)); - if (!StopBefore.empty() && !StopAfter.empty()) - return make_error<StringError>( - Twine(StopBeforeOptName) + " and " + StopAfterOptName + " specified!", - std::make_error_code(std::errc::invalid_argument)); - - StartStopInfo Result; - Result.StartPass = StartBefore.empty() ? StartAfter : StartBefore; - Result.StopPass = StopBefore.empty() ? StopAfter : StopBefore; - Result.StartInstanceNum = - StartBefore.empty() ? StartAfterInstanceNum : StartBeforeInstanceNum; - Result.StopInstanceNum = - StopBefore.empty() ? StopAfterInstanceNum : StopBeforeInstanceNum; - Result.StartAfter = !StartAfter.empty(); - Result.StopAfter = !StopAfter.empty(); - Result.StartInstanceNum += Result.StartInstanceNum == 0; - Result.StopInstanceNum += Result.StopInstanceNum == 0; - return Result; -} - // Out of line constructor provides default values for pass options and // registers all common codegen passes. TargetPassConfig::TargetPassConfig(LLVMTargetMachine &TM, PassManagerBase &pm) |