diff options
author | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2016-05-10 08:09:37 +0000 |
---|---|---|
committer | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2016-05-10 08:09:37 +0000 |
commit | 8e5b0c65ccb012c850a8d11cc74eafe79dea5825 (patch) | |
tree | c6b142f74a0918651eded82ebcb579f29831989a /llvm/lib/CodeGen/LiveRangeEdit.cpp | |
parent | ebc7135f8e529470c9745e8324d74f48f0fc3749 (diff) | |
download | bcm5719-llvm-8e5b0c65ccb012c850a8d11cc74eafe79dea5825.tar.gz bcm5719-llvm-8e5b0c65ccb012c850a8d11cc74eafe79dea5825.zip |
[foldMemoryOperand()] Pass LiveIntervals to enable liveness check.
SystemZ (and probably other targets as well) can fold a memory operand
by changing the opcode into a new instruction that as a side-effect
also clobbers the CC-reg.
In order to do this, liveness of that reg must first be checked. When
LIS is passed, getRegUnit() can be called on it and the right
LiveRange is computed on demand.
Reviewed by Matthias Braun.
http://reviews.llvm.org/D19861
llvm-svn: 269026
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index 3ed02f46c0e..8b355f00255 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -205,7 +205,7 @@ bool LiveRangeEdit::foldAsLoad(LiveInterval *LI, if (UseMI->readsWritesVirtualRegister(LI->reg, &Ops).second) return false; - MachineInstr *FoldMI = TII.foldMemoryOperand(UseMI, Ops, DefMI); + MachineInstr *FoldMI = TII.foldMemoryOperand(UseMI, Ops, DefMI, &LIS); if (!FoldMI) return false; DEBUG(dbgs() << " folded: " << *FoldMI); |