diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 08:45:04 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 08:45:04 +0000 |
commit | cfcdc236689701055fe0299e95b779b6bd00be60 (patch) | |
tree | 9e46fc39a589be0f132c6a29022ded94ff89c4e8 /lib/CodeGen/SimpleRegisterCoalescing.h | |
parent | bd0ca9c95cb9915cb59bbf507d00169cc42258a5 (diff) | |
download | external_llvm-cfcdc236689701055fe0299e95b779b6bd00be60.tar.gz external_llvm-cfcdc236689701055fe0299e95b779b6bd00be60.tar.bz2 external_llvm-cfcdc236689701055fe0299e95b779b6bd00be60.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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.h')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.h b/lib/CodeGen/SimpleRegisterCoalescing.h index cce5cebd9e..9e55c22003 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.h +++ b/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); |