aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveRangeEdit.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2023-07-26 15:41:17 -0700
committerVitaly Buka <vitalybuka@google.com>2023-07-26 22:13:32 -0700
commita496c8be6e638ae58bb45f13113dbe3a4b7b23fd (patch)
tree4c1f5e42c8ce8af5fd33d022e653e874f80742c9 /llvm/lib/CodeGen/LiveRangeEdit.cpp
parentfa140fe211836653269ba279381a55c171b52584 (diff)
downloadllvm-a496c8be6e638ae58bb45f13113dbe3a4b7b23fd.zip
llvm-a496c8be6e638ae58bb45f13113dbe3a4b7b23fd.tar.gz
llvm-a496c8be6e638ae58bb45f13113dbe3a4b7b23fd.tar.bz2
Revert "[CodeGen]Allow targets to use target specific COPY instructions for live range splitting"
And dependent commits. Details in D150388. This reverts commit 825b7f0ca5f2211ec3c93139f98d1e24048c225c. This reverts commit 7a98f084c4d121244ef7286bc6503b6a181d446e. This reverts commit b4a62b1fa546312d882fa12dfdcd015177d66826. This reverts commit b7836d856206ec39509d42529f958c920368166b. No conflicts in the code, few tests had conflicts in autogenerated CHECKs: llvm/test/CodeGen/Thumb2/mve-float32regloops.ll llvm/test/CodeGen/AMDGPU/fix-frame-reg-in-custom-csr-spills.ll Reviewed By: alexfh Differential Revision: https://reviews.llvm.org/D156381
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp
index ff49e08..c3477cd 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -352,8 +352,7 @@ void LiveRangeEdit::eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink) {
// unlikely to change anything. We typically don't want to shrink the
// PIC base register that has lots of uses everywhere.
// Always shrink COPY uses that probably come from live range splitting.
- if ((MI->readsVirtualRegister(Reg) &&
- (MO.isDef() || TII.isCopyInstr(*MI))) ||
+ if ((MI->readsVirtualRegister(Reg) && (MI->isCopy() || MO.isDef())) ||
(MO.readsReg() && (MRI.hasOneNonDBGUse(Reg) || useIsKill(LI, MO))))
ToShrink.insert(&LI);
else if (MO.readsReg())