Compute critical loop predecessors in the same way as critical loop exits.
Critical edges going into a loop are not as bad as critical exits. We can handle
them by splitting the critical edge, or by having both inside and outside
registers live out of the predecessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117423 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index d9f16dc..08fac7f 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -122,6 +122,11 @@
bool canSplitCriticalExits(const LoopBlocks &Blocks,
BlockPtrSet &CriticalExits);
+ /// getCriticalPreds - Get the set of loop predecessors with critical edges to
+ /// blocks outside the loop that have curli live in. We don't have to break
+ /// these edges, but they do require special treatment.
+ void getCriticalPreds(const LoopBlocks &Blocks, BlockPtrSet &CriticalPreds);
+
/// getBestSplitLoop - Return the loop where curli may best be split to a
/// separate register, or NULL.
const MachineLoop *getBestSplitLoop();