summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-08-28 07:53:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-08-28 07:53:51 +0000
commit69756020245174e3e5f9d611e065f3fcd0ceb8ac (patch)
treed339907c8c3b105923c64580661dad83442f4688 /llvm/lib/CodeGen/SimpleRegisterCoalescing.h
parent97af20f85f8a12dfc533b41f782e2d81eb22d2c8 (diff)
downloadbcm5719-llvm-69756020245174e3e5f9d611e065f3fcd0ceb8ac.tar.gz
bcm5719-llvm-69756020245174e3e5f9d611e065f3fcd0ceb8ac.zip
If a copy isn't coalesced, but its src is defined by trivial computation. Re-materialize the src to replace the copy.
llvm-svn: 55467
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.h')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.h b/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
index bb21515a354..62738952aa2 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.h
+++ b/llvm/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,
OpenPOWER on IntegriCloud