diff options
Diffstat (limited to 'backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp')
| -rw-r--r-- | backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp index 88bc78e..0814641 100644 --- a/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp +++ b/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp @@ -215,10 +215,9 @@ Expected<MachinePassResult> InstructionSelect::run(MachineFunction &Function, return runImplementation(Function, Target, Analyses); } -Expected<MachinePassResult> InstructionSelect::runImplementation(MachineFunction &Function, - const TargetDescription &Target, - MachineFunctionAnalysisManager - &Analyses) { +Expected<MachinePassResult> +InstructionSelect::runImplementation(MachineFunction &Function, const TargetDescription &Target, + MachineFunctionAnalysisManager &Analyses) { MachinePassResult Result; std::vector<MachineInstr *> Worklist; @@ -378,7 +377,7 @@ Expected<MachinePassResult> InstructionSelect::runImplementation(MachineFunction auto Replaced = Function.registerInfo().replaceRegWith(*Destination, *Source); if (!Replaced) return std::unexpected(Replaced.error()); - auto Removed = Block->removeInstruction(*Instruction); + auto Removed = Instruction->eraseFromParent(); if (!Removed) return std::unexpected(Removed.error()); Result.Changed = true; |
