diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-08-28 07:53:51 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-08-28 07:53:51 +0000 |
commit | cbe48593bc4048978f388a50de5f8c896d8d2813 (patch) | |
tree | 619b07c4b68fe2e6a0e58bf7e9f9a240564e2856 /lib/CodeGen/SimpleRegisterCoalescing.h | |
parent | bf81b9b3a2502f28aa0841a695b7e55929593f29 (diff) | |
download | external_llvm-cbe48593bc4048978f388a50de5f8c896d8d2813.tar.gz external_llvm-cbe48593bc4048978f388a50de5f8c896d8d2813.tar.bz2 external_llvm-cbe48593bc4048978f388a50de5f8c896d8d2813.zip |
If a copy isn't coalesced, but its src is defined by trivial computation. Re-materialize the src to replace the copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55467 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, |