summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-05 08:45:04 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-05 08:45:04 +0000
commit0f734469ebe096dbca8f42cdae62f96d6fcd0b03 (patch)
tree81593ce5b7bc9f69ca467aa544b339c504c4c018 /llvm/lib/CodeGen/SimpleRegisterCoalescing.h
parent64fdacc27f911eac3515471cfc327effc6410011 (diff)
downloadbcm5719-llvm-0f734469ebe096dbca8f42cdae62f96d6fcd0b03.tar.gz
bcm5719-llvm-0f734469ebe096dbca8f42cdae62f96d6fcd0b03.zip
ReMaterializeTrivialDef need to trim the live interval to the last kill if the copy kills the source register. This fixes uint64tof64.ll after ARM::MOVi is marked as isAsCheapAsAMove.
llvm-svn: 63853
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.h')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.h b/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
index cce5cebd9e6..9e55c220034 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
@@ -196,6 +196,15 @@ namespace llvm {
bool RemoveCopyByCommutingDef(LiveInterval &IntA, LiveInterval &IntB,
MachineInstr *CopyMI);
+ /// TrimLiveIntervalToLastUse - If there is a last use in the same basic
+ /// block as the copy instruction, trim the ive interval to the last use
+ /// and return true.
+ bool TrimLiveIntervalToLastUse(unsigned CopyIdx,
+ MachineBasicBlock *CopyMBB,
+ LiveInterval &li, const LiveRange *LR);
+
+ /// ReMaterializeTrivialDef - If the source of a copy is defined by a trivial
+ /// computation, replace the copy by rematerialize the definition.
bool ReMaterializeTrivialDef(LiveInterval &SrcInt, unsigned DstReg,
MachineInstr *CopyMI);
OpenPOWER on IntegriCloud