diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-08-30 09:09:33 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-08-30 09:09:33 +0000 |
commit | b3b1bd72634e76fa8df2243bbf8712c0fb915a2f (patch) | |
tree | 016fef54f0cd5a4474fe154bba95fb2380d8fdfb /lib/CodeGen/SimpleRegisterCoalescing.h | |
parent | a07a9a214b371f0cbc62fe77941971a1ff5063b8 (diff) | |
download | external_llvm-b3b1bd72634e76fa8df2243bbf8712c0fb915a2f.tar.gz external_llvm-b3b1bd72634e76fa8df2243bbf8712c0fb915a2f.tar.bz2 external_llvm-b3b1bd72634e76fa8df2243bbf8712c0fb915a2f.zip |
Re-apply 55467 with fix. If copy is being replaced by remat'ed def, transfer the implicit defs onto the remat'ed instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.h')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.h b/lib/CodeGen/SimpleRegisterCoalescing.h index bb21515a35..62738952aa 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.h +++ b/lib/CodeGen/SimpleRegisterCoalescing.h @@ -96,6 +96,10 @@ namespace llvm { /// SmallPtrSet<MachineInstr*, 32> JoinedCopies; + /// ReMatCopies - Keep track of copies eliminated due to remat. + /// + SmallPtrSet<MachineInstr*, 32> ReMatCopies; + public: static char ID; // Pass identifcation, replacement for typeid SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {} @@ -194,6 +198,9 @@ namespace llvm { bool RemoveCopyByCommutingDef(LiveInterval &IntA, LiveInterval &IntB, MachineInstr *CopyMI); + bool ReMaterializeTrivialDef(LiveInterval &SrcInt, unsigned DstReg, + MachineInstr *CopyMI); + /// TurnCopyIntoImpDef - If source of the specified copy is an implicit def, /// turn the copy into an implicit def. bool TurnCopyIntoImpDef(MachineBasicBlock::iterator &I, |