aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-28 13:45:07 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-28 13:45:07 +0800
commite72ad2cd524ff38f162a23d69da5f78494d337ae (patch)
tree2e590806b0f610e4392f25f6e8cdff57d2f5a929 /backend/lib/CodeGen/MachineLICM.cpp
parent3b14bd4d5324b5a280c1ee5567b5526b59e60c5b (diff)
downloadrcc-project-e72ad2cd524ff38f162a23d69da5f78494d337ae.tar.gz
rcc-project-e72ad2cd524ff38f162a23d69da5f78494d337ae.tar.xz
[CodeGen] Centralize machine instruction erasure
Diffstat (limited to 'backend/lib/CodeGen/MachineLICM.cpp')
-rw-r--r--backend/lib/CodeGen/MachineLICM.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/lib/CodeGen/MachineLICM.cpp b/backend/lib/CodeGen/MachineLICM.cpp
index 6ab15dc..3863388 100644
--- a/backend/lib/CodeGen/MachineLICM.cpp
+++ b/backend/lib/CodeGen/MachineLICM.cpp
@@ -303,7 +303,7 @@ operandsAreInvariant(const MachineInstr &Instruction, const MachineLoop &Loop,
auto Anchor = firstTerminator(Preheader, Target);
if (!Anchor)
return std::unexpected(Anchor.error());
- auto Removed = Source->removeInstruction(Instruction);
+ auto Removed = Instruction.eraseFromParent();
if (!Removed)
return std::unexpected(Removed.error());
if (*Anchor != nullptr)