blob: 236986e4af9f096f492bb20029d711c07e986915 [file] [log] [blame]
Jakob Stoklund Olesen8dd070e2011-01-04 21:10:05 +00001//===-------- SplitKit.h - Toolkit for splitting live ranges ----*- C++ -*-===//
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the SplitAnalysis class as well as mutator functions for
11// live range splitting.
12//
13//===----------------------------------------------------------------------===//
14
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000015#include "llvm/ADT/DenseMap.h"
Jakob Stoklund Olesen8d0963f2010-12-21 01:50:21 +000016#include "llvm/ADT/SmallPtrSet.h"
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +000017#include "llvm/CodeGen/SlotIndexes.h"
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000018
19namespace llvm {
20
21class LiveInterval;
22class LiveIntervals;
Jakob Stoklund Olesena17768f2010-10-14 23:49:52 +000023class LiveRangeEdit;
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000024class MachineInstr;
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000025class MachineLoop;
26class MachineLoopInfo;
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +000027class MachineRegisterInfo;
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +000028class TargetInstrInfo;
Jakob Stoklund Olesencfa71342010-11-10 19:31:50 +000029class TargetRegisterInfo;
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +000030class VirtRegMap;
31class VNInfo;
Jakob Stoklund Olesen532de3d2010-10-22 20:28:21 +000032class raw_ostream;
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000033
Jakob Stoklund Olesene1dde7b2010-10-28 20:34:52 +000034/// At some point we should just include MachineDominators.h:
35class MachineDominatorTree;
36template <class NodeT> class DomTreeNodeBase;
37typedef DomTreeNodeBase<MachineBasicBlock> MachineDomTreeNode;
38
Jakob Stoklund Olesen8d0963f2010-12-21 01:50:21 +000039
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +000040/// SplitAnalysis - Analyze a LiveInterval, looking for live range splitting
41/// opportunities.
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000042class SplitAnalysis {
Jakob Stoklund Olesen08e93b12010-08-10 17:07:22 +000043public:
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000044 const MachineFunction &mf_;
45 const LiveIntervals &lis_;
46 const MachineLoopInfo &loops_;
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +000047 const TargetInstrInfo &tii_;
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000048
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000049 // Instructions using the the current register.
50 typedef SmallPtrSet<const MachineInstr*, 16> InstrPtrSet;
51 InstrPtrSet usingInstrs_;
52
53 // The number of instructions using curli in each basic block.
54 typedef DenseMap<const MachineBasicBlock*, unsigned> BlockCountMap;
55 BlockCountMap usingBlocks_;
56
Jakob Stoklund Olesen2dee7a52010-08-12 23:02:55 +000057 // The number of basic block using curli in each loop.
58 typedef DenseMap<const MachineLoop*, unsigned> LoopCountMap;
59 LoopCountMap usingLoops_;
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000060
Jakob Stoklund Olesenf1b05f22010-08-12 17:07:14 +000061private:
62 // Current live interval.
63 const LiveInterval *curli_;
64
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000065 // Sumarize statistics by counting instructions using curli_.
Jakob Stoklund Olesenabff2802010-07-20 16:12:37 +000066 void analyzeUses();
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000067
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +000068 /// canAnalyzeBranch - Return true if MBB ends in a branch that can be
69 /// analyzed.
70 bool canAnalyzeBranch(const MachineBasicBlock *MBB);
71
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000072public:
Jakob Stoklund Olesenf2c6e362010-07-20 23:50:15 +000073 SplitAnalysis(const MachineFunction &mf, const LiveIntervals &lis,
74 const MachineLoopInfo &mli);
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +000075
76 /// analyze - set curli to the specified interval, and analyze how it may be
77 /// split.
78 void analyze(const LiveInterval *li);
79
80 /// clear - clear all data structures so SplitAnalysis is ready to analyze a
81 /// new interval.
82 void clear();
83
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +000084 typedef SmallPtrSet<const MachineBasicBlock*, 16> BlockPtrSet;
Jakob Stoklund Olesen2dee7a52010-08-12 23:02:55 +000085 typedef SmallPtrSet<const MachineLoop*, 16> LoopPtrSet;
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +000086
Jakob Stoklund Olesen532de3d2010-10-22 20:28:21 +000087 // Print a set of blocks with use counts.
88 void print(const BlockPtrSet&, raw_ostream&) const;
89
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +000090 // Sets of basic blocks surrounding a machine loop.
91 struct LoopBlocks {
92 BlockPtrSet Loop; // Blocks in the loop.
93 BlockPtrSet Preds; // Loop predecessor blocks.
94 BlockPtrSet Exits; // Loop exit blocks.
95
96 void clear() {
97 Loop.clear();
98 Preds.clear();
99 Exits.clear();
100 }
101 };
102
Jakob Stoklund Olesen532de3d2010-10-22 20:28:21 +0000103 // Print loop blocks with use counts.
104 void print(const LoopBlocks&, raw_ostream&) const;
105
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +0000106 // Calculate the block sets surrounding the loop.
107 void getLoopBlocks(const MachineLoop *Loop, LoopBlocks &Blocks);
108
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +0000109 /// LoopPeripheralUse - how is a variable used in and around a loop?
110 /// Peripheral blocks are the loop predecessors and exit blocks.
111 enum LoopPeripheralUse {
112 ContainedInLoop, // All uses are inside the loop.
113 SinglePeripheral, // At most one instruction per peripheral block.
114 MultiPeripheral, // Multiple instructions in some peripheral blocks.
115 OutsideLoop // Uses outside loop periphery.
116 };
117
118 /// analyzeLoopPeripheralUse - Return an enum describing how curli_ is used in
119 /// and around the Loop.
Jakob Stoklund Olesen6a0dc072010-07-20 21:46:58 +0000120 LoopPeripheralUse analyzeLoopPeripheralUse(const LoopBlocks&);
121
122 /// getCriticalExits - It may be necessary to partially break critical edges
123 /// leaving the loop if an exit block has phi uses of curli. Collect the exit
124 /// blocks that need special treatment into CriticalExits.
125 void getCriticalExits(const LoopBlocks &Blocks, BlockPtrSet &CriticalExits);
126
127 /// canSplitCriticalExits - Return true if it is possible to insert new exit
128 /// blocks before the blocks in CriticalExits.
129 bool canSplitCriticalExits(const LoopBlocks &Blocks,
130 BlockPtrSet &CriticalExits);
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +0000131
Jakob Stoklund Olesen0960a652010-10-27 00:39:05 +0000132 /// getCriticalPreds - Get the set of loop predecessors with critical edges to
133 /// blocks outside the loop that have curli live in. We don't have to break
134 /// these edges, but they do require special treatment.
135 void getCriticalPreds(const LoopBlocks &Blocks, BlockPtrSet &CriticalPreds);
136
Jakob Stoklund Olesen521a4532010-12-15 17:41:19 +0000137 /// getSplitLoops - Get the set of loops that have curli uses and would be
138 /// profitable to split.
139 void getSplitLoops(LoopPtrSet&);
140
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +0000141 /// getBestSplitLoop - Return the loop where curli may best be split to a
142 /// separate register, or NULL.
143 const MachineLoop *getBestSplitLoop();
Jakob Stoklund Olesenf1b05f22010-08-12 17:07:14 +0000144
Jakob Stoklund Olesen697483a2010-12-15 17:49:52 +0000145 /// isBypassLoop - Return true if curli is live through Loop and has no uses
146 /// inside the loop. Bypass loops are candidates for splitting because it can
147 /// prevent interference inside the loop.
148 bool isBypassLoop(const MachineLoop *Loop);
149
150 /// getBypassLoops - Get all the maximal bypass loops. These are the bypass
151 /// loops whose parent is not a bypass loop.
152 void getBypassLoops(LoopPtrSet&);
153
Jakob Stoklund Olesenf1b05f22010-08-12 17:07:14 +0000154 /// getMultiUseBlocks - Add basic blocks to Blocks that may benefit from
155 /// having curli split to a new live interval. Return true if Blocks can be
156 /// passed to SplitEditor::splitSingleBlocks.
157 bool getMultiUseBlocks(BlockPtrSet &Blocks);
Jakob Stoklund Olesenfc412d82010-08-13 21:18:48 +0000158
159 /// getBlockForInsideSplit - If curli is contained inside a single basic block,
160 /// and it wou pay to subdivide the interval inside that block, return it.
161 /// Otherwise return NULL. The returned block can be passed to
162 /// SplitEditor::splitInsideBlock.
163 const MachineBasicBlock *getBlockForInsideSplit();
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +0000164};
165
Jakob Stoklund Olesen1407c842010-08-18 19:00:08 +0000166
167/// LiveIntervalMap - Map values from a large LiveInterval into a small
168/// interval that is a subset. Insert phi-def values as needed. This class is
169/// used by SplitEditor to create new smaller LiveIntervals.
170///
171/// parentli_ is the larger interval, li_ is the subset interval. Every value
172/// in li_ corresponds to exactly one value in parentli_, and the live range
173/// of the value is contained within the live range of the parentli_ value.
174/// Values in parentli_ may map to any number of openli_ values, including 0.
175class LiveIntervalMap {
176 LiveIntervals &lis_;
Jakob Stoklund Olesend68f4582010-10-28 20:34:50 +0000177 MachineDominatorTree &mdt_;
Jakob Stoklund Olesen1407c842010-08-18 19:00:08 +0000178
179 // The parent interval is never changed.
180 const LiveInterval &parentli_;
181
182 // The child interval's values are fully contained inside parentli_ values.
Jakob Stoklund Olesen9ca2aeb2010-09-13 23:29:09 +0000183 LiveInterval *li_;
Jakob Stoklund Olesen1407c842010-08-18 19:00:08 +0000184
185 typedef DenseMap<const VNInfo*, VNInfo*> ValueMap;
186
187 // Map parentli_ values to simple values in li_ that are defined at the same
188 // SlotIndex, or NULL for parentli_ values that have complex li_ defs.
189 // Note there is a difference between values mapping to NULL (complex), and
190 // values not present (unknown/unmapped).
191 ValueMap valueMap_;
192
Jakob Stoklund Olesene1dde7b2010-10-28 20:34:52 +0000193 typedef std::pair<VNInfo*, MachineDomTreeNode*> LiveOutPair;
194 typedef DenseMap<MachineBasicBlock*,LiveOutPair> LiveOutMap;
195
196 // liveOutCache_ - Map each basic block where li_ is live out to the live-out
197 // value and its defining block. One of these conditions shall be true:
198 //
199 // 1. !liveOutCache_.count(MBB)
200 // 2. liveOutCache_[MBB].second.getNode() == MBB
201 // 3. forall P in preds(MBB): liveOutCache_[P] == liveOutCache_[MBB]
202 //
203 // This is only a cache, the values can be computed as:
204 //
205 // VNI = li_->getVNInfoAt(lis_.getMBBEndIdx(MBB))
206 // Node = mbt_[lis_.getMBBFromIndex(VNI->def)]
207 //
208 // The cache is also used as a visiteed set by mapValue().
209 LiveOutMap liveOutCache_;
210
Jakob Stoklund Olesen1407c842010-08-18 19:00:08 +0000211public:
212 LiveIntervalMap(LiveIntervals &lis,
Jakob Stoklund Olesend68f4582010-10-28 20:34:50 +0000213 MachineDominatorTree &mdt,
Jakob Stoklund Olesen9ca2aeb2010-09-13 23:29:09 +0000214 const LiveInterval &parentli)
Jakob Stoklund Olesend68f4582010-10-28 20:34:50 +0000215 : lis_(lis), mdt_(mdt), parentli_(parentli), li_(0) {}
Jakob Stoklund Olesen9ca2aeb2010-09-13 23:29:09 +0000216
217 /// reset - clear all data structures and start a new live interval.
218 void reset(LiveInterval *);
219
220 /// getLI - return the current live interval.
221 LiveInterval *getLI() const { return li_; }
Jakob Stoklund Olesen1407c842010-08-18 19:00:08 +0000222
223 /// defValue - define a value in li_ from the parentli_ value VNI and Idx.
224 /// Idx does not have to be ParentVNI->def, but it must be contained within
225 /// ParentVNI's live range in parentli_.
226 /// Return the new li_ value.
227 VNInfo *defValue(const VNInfo *ParentVNI, SlotIndex Idx);
228
229 /// mapValue - map ParentVNI to the corresponding li_ value at Idx. It is
230 /// assumed that ParentVNI is live at Idx.
231 /// If ParentVNI has not been defined by defValue, it is assumed that
232 /// ParentVNI->def dominates Idx.
233 /// If ParentVNI has been defined by defValue one or more times, a value that
234 /// dominates Idx will be returned. This may require creating extra phi-def
235 /// values and adding live ranges to li_.
Jakob Stoklund Olesen5fa42a42010-09-21 22:32:21 +0000236 /// If simple is not NULL, *simple will indicate if ParentVNI is a simply
237 /// mapped value.
238 VNInfo *mapValue(const VNInfo *ParentVNI, SlotIndex Idx, bool *simple = 0);
239
Jakob Stoklund Olesenfc60d772010-10-05 20:36:25 +0000240 // extendTo - Find the last li_ value defined in MBB at or before Idx. The
241 // parentli is assumed to be live at Idx. Extend the live range to include
242 // Idx. Return the found VNInfo, or NULL.
Jakob Stoklund Olesenc95c1462010-10-27 00:39:07 +0000243 VNInfo *extendTo(const MachineBasicBlock *MBB, SlotIndex Idx);
Jakob Stoklund Olesenfc60d772010-10-05 20:36:25 +0000244
Jakob Stoklund Olesen5fa42a42010-09-21 22:32:21 +0000245 /// isMapped - Return true is ParentVNI is a known mapped value. It may be a
246 /// simple 1-1 mapping or a complex mapping to later defs.
247 bool isMapped(const VNInfo *ParentVNI) const {
248 return valueMap_.count(ParentVNI);
249 }
250
251 /// isComplexMapped - Return true if ParentVNI has received new definitions
252 /// with defValue.
253 bool isComplexMapped(const VNInfo *ParentVNI) const;
254
255 // addSimpleRange - Add a simple range from parentli_ to li_.
256 // ParentVNI must be live in the [Start;End) interval.
257 void addSimpleRange(SlotIndex Start, SlotIndex End, const VNInfo *ParentVNI);
Jakob Stoklund Olesen1407c842010-08-18 19:00:08 +0000258
259 /// addRange - Add live ranges to li_ where [Start;End) intersects parentli_.
260 /// All needed values whose def is not inside [Start;End) must be defined
261 /// beforehand so mapValue will work.
262 void addRange(SlotIndex Start, SlotIndex End);
263};
264
265
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000266/// SplitEditor - Edit machine code and LiveIntervals for live range
267/// splitting.
268///
Jakob Stoklund Olesen5eb308b2010-08-06 22:17:33 +0000269/// - Create a SplitEditor from a SplitAnalysis.
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000270/// - Start a new live interval with openIntv.
271/// - Mark the places where the new interval is entered using enterIntv*
272/// - Mark the ranges where the new interval is used with useIntv*
273/// - Mark the places where the interval is exited with exitIntv*.
274/// - Finish the current interval with closeIntv and repeat from 2.
Jakob Stoklund Olesen74669272010-10-08 23:42:21 +0000275/// - Rewrite instructions with finish().
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000276///
277class SplitEditor {
278 SplitAnalysis &sa_;
279 LiveIntervals &lis_;
280 VirtRegMap &vrm_;
281 MachineRegisterInfo &mri_;
282 const TargetInstrInfo &tii_;
Jakob Stoklund Olesencfa71342010-11-10 19:31:50 +0000283 const TargetRegisterInfo &tri_;
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000284
Jakob Stoklund Olesena17768f2010-10-14 23:49:52 +0000285 /// edit_ - The current parent register and new intervals created.
286 LiveRangeEdit &edit_;
287
Jakob Stoklund Olesen5eb308b2010-08-06 22:17:33 +0000288 /// dupli_ - Created as a copy of curli_, ranges are carved out as new
289 /// intervals get added through openIntv / closeIntv. This is used to avoid
290 /// editing curli_.
Jakob Stoklund Olesendd9f3fd2010-09-13 23:29:11 +0000291 LiveIntervalMap dupli_;
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000292
293 /// Currently open LiveInterval.
Jakob Stoklund Olesendd9f3fd2010-09-13 23:29:11 +0000294 LiveIntervalMap openli_;
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000295
Jakob Stoklund Olesencfa71342010-11-10 19:31:50 +0000296 /// defFromParent - Define Reg from ParentVNI at UseIdx using either
297 /// rematerialization or a COPY from parent. Return the new value.
298 VNInfo *defFromParent(LiveIntervalMap &Reg,
299 VNInfo *ParentVNI,
300 SlotIndex UseIdx,
301 MachineBasicBlock &MBB,
302 MachineBasicBlock::iterator I);
303
Jakob Stoklund Olesen5fa42a42010-09-21 22:32:21 +0000304 /// intervalsLiveAt - Return true if any member of intervals_ is live at Idx.
305 bool intervalsLiveAt(SlotIndex Idx) const;
306
307 /// Values in curli whose live range has been truncated when entering an open
308 /// li.
309 SmallPtrSet<const VNInfo*, 8> truncatedValues;
310
311 /// addTruncSimpleRange - Add the given simple range to dupli_ after
312 /// truncating any overlap with intervals_.
313 void addTruncSimpleRange(SlotIndex Start, SlotIndex End, VNInfo *VNI);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000314
Jakob Stoklund Olesenc95c1462010-10-27 00:39:07 +0000315 /// criticalPreds_ - Set of basic blocks where both dupli and openli should be
316 /// live out because of a critical edge.
317 SplitAnalysis::BlockPtrSet criticalPreds_;
318
Jakob Stoklund Olesen74669272010-10-08 23:42:21 +0000319 /// computeRemainder - Compute the dupli liveness as the complement of all the
320 /// new intervals.
321 void computeRemainder();
322
323 /// rewrite - Rewrite all uses of reg to use the new registers.
324 void rewrite(unsigned reg);
325
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000326public:
327 /// Create a new SplitEditor for editing the LiveInterval analyzed by SA.
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000328 /// Newly created intervals will be appended to newIntervals.
Jakob Stoklund Olesend68f4582010-10-28 20:34:50 +0000329 SplitEditor(SplitAnalysis &SA, LiveIntervals&, VirtRegMap&,
330 MachineDominatorTree&, LiveRangeEdit&);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000331
Jakob Stoklund Olesen5eb308b2010-08-06 22:17:33 +0000332 /// getAnalysis - Get the corresponding analysis.
333 SplitAnalysis &getAnalysis() { return sa_; }
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000334
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000335 /// Create a new virtual register and live interval.
336 void openIntv();
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000337
Jakob Stoklund Olesenf1b05f22010-08-12 17:07:14 +0000338 /// enterIntvBefore - Enter openli before the instruction at Idx. If curli is
339 /// not live before Idx, a COPY is not inserted.
340 void enterIntvBefore(SlotIndex Idx);
341
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000342 /// enterIntvAtEnd - Enter openli at the end of MBB.
Jakob Stoklund Olesenf6a129a2010-09-16 00:01:36 +0000343 void enterIntvAtEnd(MachineBasicBlock &MBB);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000344
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000345 /// useIntv - indicate that all instructions in MBB should use openli.
346 void useIntv(const MachineBasicBlock &MBB);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000347
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000348 /// useIntv - indicate that all instructions in range should use openli.
349 void useIntv(SlotIndex Start, SlotIndex End);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000350
Jakob Stoklund Olesenf1b05f22010-08-12 17:07:14 +0000351 /// leaveIntvAfter - Leave openli after the instruction at Idx.
352 void leaveIntvAfter(SlotIndex Idx);
353
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000354 /// leaveIntvAtTop - Leave the interval at the top of MBB.
355 /// Currently, only one value can leave the interval.
356 void leaveIntvAtTop(MachineBasicBlock &MBB);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000357
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000358 /// closeIntv - Indicate that we are done editing the currently open
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000359 /// LiveInterval, and ranges can be trimmed.
Jakob Stoklund Olesen7536f722010-08-04 22:08:39 +0000360 void closeIntv();
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000361
Jakob Stoklund Olesen74669272010-10-08 23:42:21 +0000362 /// finish - after all the new live ranges have been created, compute the
363 /// remaining live range, and rewrite instructions to use the new registers.
364 void finish();
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000365
366 // ===--- High level methods ---===
367
368 /// splitAroundLoop - Split curli into a separate live interval inside
Jakob Stoklund Olesen57d0f2d2010-10-05 22:19:33 +0000369 /// the loop.
370 void splitAroundLoop(const MachineLoop*);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000371
Jakob Stoklund Olesenf1b05f22010-08-12 17:07:14 +0000372 /// splitSingleBlocks - Split curli into a separate live interval inside each
Jakob Stoklund Olesen57d0f2d2010-10-05 22:19:33 +0000373 /// basic block in Blocks.
374 void splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks);
Jakob Stoklund Olesenf0179002010-07-26 23:44:11 +0000375
Jakob Stoklund Olesen57d0f2d2010-10-05 22:19:33 +0000376 /// splitInsideBlock - Split curli into multiple intervals inside MBB.
377 void splitInsideBlock(const MachineBasicBlock *);
Jakob Stoklund Olesenfc412d82010-08-13 21:18:48 +0000378};
Jakob Stoklund Olesen8ae02632010-07-20 15:41:07 +0000379
380}