aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/MachineSink.cpp')
-rw-r--r--backend/lib/CodeGen/MachineSink.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/backend/lib/CodeGen/MachineSink.cpp b/backend/lib/CodeGen/MachineSink.cpp
index 1c2d2b7..dda2048 100644
--- a/backend/lib/CodeGen/MachineSink.cpp
+++ b/backend/lib/CodeGen/MachineSink.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"
@@ -343,24 +342,7 @@ const MachinePassContract &MachineSinkPass::contract() const noexcept {
Expected<MachinePassResult> MachineSinkPass::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 sink 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 sink diverged after a successful transaction preflight: "));
- }
- return Result;
+ return runImplementation(Function, Target, Analyses);
}
Expected<MachinePassResult>