diff options
Diffstat (limited to 'backend/lib/CodeGen/MachineCSE.cpp')
| -rw-r--r-- | backend/lib/CodeGen/MachineCSE.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/backend/lib/CodeGen/MachineCSE.cpp b/backend/lib/CodeGen/MachineCSE.cpp index 50dca0e..7bd5a22 100644 --- a/backend/lib/CodeGen/MachineCSE.cpp +++ b/backend/lib/CodeGen/MachineCSE.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/MachineMemOperand.h" #include "rcc/CodeGen/MachineOperand.h" @@ -16,7 +15,6 @@ #include <cstddef> #include <cstdint> -#include <optional> #include <string> #include <unordered_map> #include <unordered_set> @@ -293,24 +291,7 @@ const MachinePassContract &MachineCSEPass::contract() const noexcept { Expected<MachinePassResult> MachineCSEPass::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 CSE 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 CSE diverged after a successful transaction preflight: ")); - } - return Result; + return runImplementation(Function, Target, Analyses); } Expected<MachinePassResult> |
