diff options
author | Vitaly Buka <vitalybuka@google.com> | 2023-09-11 11:04:53 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2023-09-11 11:09:26 -0700 |
commit | f106b3f135005ca48a7b4113bd51700c08956afd (patch) | |
tree | b8e39f10a553646e7299bbbf3147ce5aa6038e6d /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | eb81493e95c9f0e7feecd699758caa56b7d3514e (diff) | |
download | llvm-f106b3f135005ca48a7b4113bd51700c08956afd.zip llvm-f106b3f135005ca48a7b4113bd51700c08956afd.tar.gz llvm-f106b3f135005ca48a7b4113bd51700c08956afd.tar.bz2 |
Revert "[PHIElimination] Handle subranges in LiveInterval updates"
Leaks memory.
This reverts commit 3bff611068ae70e3273a46bbc72bc66b66f98c1c.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index f7beb51..280ced6 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1275,8 +1275,6 @@ MachineBasicBlock *MachineBasicBlock::SplitCriticalEdge( assert(VNI && "PHI sources should be live out of their predecessors."); LI.addSegment(LiveInterval::Segment(StartIndex, EndIndex, VNI)); - for (auto &SR : LI.subranges()) - SR.addSegment(LiveInterval::Segment(StartIndex, EndIndex, VNI)); } } } @@ -1296,18 +1294,8 @@ MachineBasicBlock *MachineBasicBlock::SplitCriticalEdge( VNInfo *VNI = LI.getVNInfoAt(PrevIndex); assert(VNI && "LiveInterval should have VNInfo where it is live."); LI.addSegment(LiveInterval::Segment(StartIndex, EndIndex, VNI)); - // Update subranges with live values - for (auto &SR : LI.subranges()) { - VNInfo *VNI = SR.getVNInfoAt(PrevIndex); - if (VNI) - SR.addSegment(LiveInterval::Segment(StartIndex, EndIndex, VNI)); - } } else if (!isLiveOut && !isLastMBB) { LI.removeSegment(StartIndex, EndIndex); - for (auto &SR : LI.subranges()) { - if (SR.overlaps(StartIndex, EndIndex)) - SR.removeSegment(StartIndex, EndIndex); - } } } |