diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-13 22:22:39 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-13 22:22:39 +0000 |
commit | b21abfed813fa46976f896439ca2f9fbd2eba9ba (patch) | |
tree | d16f95b2568b5124ac4b5871831efbc14919e868 /lib/CodeGen/SplitKit.h | |
parent | 596f447467b35d7513c997cd9098026938676461 (diff) |
Implement -split-spill-mode=size.
Whenever the complement interval is defined by multiple copies of the
same value, hoist those back-copies to the nearest common dominator.
This ensures that at most one copy is inserted per value in the
complement inteval, and no phi-defs are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r-- | lib/CodeGen/SplitKit.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h index 5abdd4c62e..67e80faefa 100644 --- a/lib/CodeGen/SplitKit.h +++ b/lib/CodeGen/SplitKit.h @@ -319,6 +319,14 @@ private: MachineBasicBlock &MBB, MachineBasicBlock::iterator I); + /// removeBackCopies - Remove the copy instructions that defines the values + /// in the vector in the complement interval. + void removeBackCopies(SmallVectorImpl<VNInfo*> &Copies); + + /// hoistCopiesForSize - Hoist back-copies to the complement interval in a + /// way that minimizes code size. This implements the SM_Size spill mode. + void hoistCopiesForSize(); + /// transferValues - Transfer values to the new ranges. /// Return true if any ranges were skipped. bool transferValues(); |