diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-15 17:49:52 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-15 17:49:52 +0000 |
commit | 697483addf056595c997302f1316cc59244eefaa (patch) | |
tree | a6ae1091cc88aba70e4a046276fbf5690c83914d /lib/CodeGen/SplitKit.h | |
parent | 521a453721aeefbb6783b6acc8ea36b3c18b4931 (diff) | |
download | llvm-697483addf056595c997302f1316cc59244eefaa.tar.gz llvm-697483addf056595c997302f1316cc59244eefaa.tar.bz2 llvm-697483addf056595c997302f1316cc59244eefaa.tar.xz |
Detect and enumerate bypass loops.
Bypass loops have the current live range live through, but contain no uses or
defs. Splitting around a bypass loop can free registers for other uses inside
the loop by spilling the split range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r-- | lib/CodeGen/SplitKit.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h index f290eb6461..0930b3974c 100644 --- a/lib/CodeGen/SplitKit.h +++ b/lib/CodeGen/SplitKit.h @@ -141,6 +141,15 @@ public: /// separate register, or NULL. const MachineLoop *getBestSplitLoop(); + /// isBypassLoop - Return true if curli is live through Loop and has no uses + /// inside the loop. Bypass loops are candidates for splitting because it can + /// prevent interference inside the loop. + bool isBypassLoop(const MachineLoop *Loop); + + /// getBypassLoops - Get all the maximal bypass loops. These are the bypass + /// loops whose parent is not a bypass loop. + void getBypassLoops(LoopPtrSet&); + /// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from /// having curli split to a new live interval. Return true if Blocks can be /// passed to SplitEditor::splitSingleBlocks. |