diff options
Diffstat (limited to 'backend/lib/CodeGen/MachineLICM.cpp')
| -rw-r--r-- | backend/lib/CodeGen/MachineLICM.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/backend/lib/CodeGen/MachineLICM.cpp b/backend/lib/CodeGen/MachineLICM.cpp index 6d76d5d..6ab15dc 100644 --- a/backend/lib/CodeGen/MachineLICM.cpp +++ b/backend/lib/CodeGen/MachineLICM.cpp @@ -7,7 +7,6 @@ #include "rcc/CodeGen/MachineAnalyses.h" #include "rcc/CodeGen/MachineBasicBlock.h" #include "rcc/CodeGen/MachineFunction.h" -#include "rcc/CodeGen/MachineFunctionCloner.h" #include "rcc/CodeGen/MachineInstr.h" #include "rcc/CodeGen/MachineOperand.h" #include "rcc/CodeGen/MachineRegisterInfo.h" @@ -321,24 +320,7 @@ const MachinePassContract &MachineLICMPass::contract() const noexcept { Expected<MachinePassResult> MachineLICMPass::run(MachineFunction &Function, const TargetDescription &Target, MachineFunctionAnalysisManager &Analyses) { - auto Trial = cloneMachineFunction( - Function, Target, - MachineFunctionCloneOptions{.NewStableID = Function.stableID(), .NewName = std::nullopt}); - if (!Trial) { - return std::unexpected( - withErrorContext(Trial.error(), "machine LICM transaction setup failed: ")); - } - MachineFunctionAnalysisManager TrialAnalyses; - auto TrialResult = runImplementation(*Trial->ClonedFunction, Target, TrialAnalyses); - if (!TrialResult) - return std::unexpected(TrialResult.error()); - - auto Result = runImplementation(Function, Target, Analyses); - if (!Result) { - return std::unexpected(withErrorContext( - Result.error(), "machine LICM diverged after a successful transaction preflight: ")); - } - return Result; + return runImplementation(Function, Target, Analyses); } Expected<MachinePassResult> |
