diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-14 16:45:39 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-14 16:45:39 +0000 |
commit | a98af3985696a634295e93db390a18d91845cc27 (patch) | |
tree | 9dcbe839e766147fd5d6cc189fa1733f854df43d /llvm/lib/CodeGen/SplitKit.h | |
parent | 1daf07338c43b37cc42f2d4df40e476f34cdcceb (diff) | |
download | bcm5719-llvm-a98af3985696a634295e93db390a18d91845cc27.tar.gz bcm5719-llvm-a98af3985696a634295e93db390a18d91845cc27.zip |
Hoist back-copies to the least busy dominator.
When a back-copy is hoisted to the nearest common dominator, keep
looking up the dominator tree for a less loopy dominator, and place the
back-copy there instead.
Don't do this when a single existing back-copy dominates all the others.
Assume the client knows what he is doing, and keep the dominating
back-copy.
This prevents us from hoisting back-copies into loops in most cases. If
a value is defined in a loop with multiple exits, we may still hoist
back-copies into that loop. That is the speed/size tradeoff.
llvm-svn: 139698
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.h')
-rw-r--r-- | llvm/lib/CodeGen/SplitKit.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.h b/llvm/lib/CodeGen/SplitKit.h index 5a294e50554..d8fc2122a3c 100644 --- a/llvm/lib/CodeGen/SplitKit.h +++ b/llvm/lib/CodeGen/SplitKit.h @@ -315,6 +315,11 @@ private: /// in the vector in the complement interval. void removeBackCopies(SmallVectorImpl<VNInfo*> &Copies); + /// getShallowDominator - Returns the least busy dominator of MBB that is + /// also dominated by DefMBB. Busy is measured by loop depth. + MachineBasicBlock *findShallowDominator(MachineBasicBlock *MBB, + MachineBasicBlock *DefMBB); + /// hoistCopiesForSize - Hoist back-copies to the complement interval in a /// way that minimizes code size. This implements the SM_Size spill mode. void hoistCopiesForSize(); |