summaryrefslogtreecommitdiffstats
path: root/polly/include
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-04-16 08:04:42 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-04-16 08:04:42 +0000
commit8edce4ee6276df36969283bf98b8bef898fb548c (patch)
tree5aa55acb4e699d80be44b1257b6309c554daddc1 /polly/include
parent5e77d76c953d915bfbbdc8c719e91e6fbc32e1f1 (diff)
downloadbcm5719-llvm-8edce4ee6276df36969283bf98b8bef898fb548c.tar.gz
bcm5719-llvm-8edce4ee6276df36969283bf98b8bef898fb548c.zip
Support SCoPs with multiple entry edges.
Regions that have multiple entry edges are very common. A simple if condition yields e.g. such a region: if / \ then else \ / for_region This for_region contains two entry edges 'then' -> 'for_region' and 'else' -> 'for_region'. Previously we scheduled the RegionSimplify pass to translate such regions into simple regions. With this patch, we now support them natively when the region is in -loop-simplify form, which means the entry block should not be a loop header. Contributed by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179586
Diffstat (limited to 'polly/include')
-rwxr-xr-xpolly/include/polly/Support/ScopHelper.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/polly/include/polly/Support/ScopHelper.h b/polly/include/polly/Support/ScopHelper.h
index 4c2336591ff..4f275b2f74b 100755
--- a/polly/include/polly/Support/ScopHelper.h
+++ b/polly/include/polly/Support/ScopHelper.h
@@ -28,6 +28,7 @@ class BasicBlock;
}
namespace polly {
+class Scop;
/// Temporary Hack for extended regiontree.
///
/// @brief Cast the region to loop.
@@ -51,6 +52,14 @@ bool hasInvokeEdge(const llvm::PHINode *PN);
llvm::Value *getPointerOperand(llvm::Instruction &Inst);
llvm::BasicBlock *createSingleExitEdge(llvm::Region *R, llvm::Pass *P);
+/// @brief Simplify the region in a scop to have a single entry edge
+/// and a single exit edge.
+///
+/// @param S The scop that is simplified.
+/// @param P The pass that is currently running.
+///
+void simplifyRegion(polly::Scop *S, llvm::Pass *P);
+
/// @brief Split the entry block of a function to store the newly inserted
/// allocations outside of all Scops.
///
OpenPOWER on IntegriCloud