summaryrefslogtreecommitdiffstats
path: root/polly/lib/RegisterPasses.cpp
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2011-11-10 12:45:07 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2011-11-10 12:45:07 +0000
commitbef690f57f5cfc3e8eca8ddcfc3c6ca707cedd9c (patch)
tree315300c2122d812cc8ffb2864b66744b225f13f3 /polly/lib/RegisterPasses.cpp
parente5e171eaddf25b82f0c65e242a0509cb4f230b36 (diff)
downloadbcm5719-llvm-bef690f57f5cfc3e8eca8ddcfc3c6ca707cedd9c.tar.gz
bcm5719-llvm-bef690f57f5cfc3e8eca8ddcfc3c6ca707cedd9c.zip
Add a workaround to fix SCoPs rejected because of 'region not simple'
llvm-svn: 144281
Diffstat (limited to 'polly/lib/RegisterPasses.cpp')
-rw-r--r--polly/lib/RegisterPasses.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/polly/lib/RegisterPasses.cpp b/polly/lib/RegisterPasses.cpp
index f7038e49c6f..5fe9588601a 100644
--- a/polly/lib/RegisterPasses.cpp
+++ b/polly/lib/RegisterPasses.cpp
@@ -114,10 +114,19 @@ static void registerPollyPasses(const llvm::PassManagerBuilder &Builder,
PM.add(polly::createCodePreparationPass());
PM.add(polly::createRegionSimplifyPass());
- // FIXME: Needed as RegionSimplifyPass destroys the canonical form of
- // induction variables (It changes the order of the operands in the
- // PHI nodes).
+ // FIXME: The next two passes should not be necessary here. They are currently
+ // because of two problems:
+ //
+ // 1. The RegionSimplifyPass destroys the canonical form of induction
+ // variables,as it produces PHI nodes with incorrectly ordered
+ // operands. To fix this we run IndVarSimplify.
+ //
+ // 2. IndVarSimplify does not preserve the region information and
+ // the regioninfo pass does currently not recover simple regions.
+ // As a result we need to run the RegionSimplify pass again to
+ // recover them
PM.add(llvm::createIndVarSimplifyPass());
+ PM.add(polly::createRegionSimplifyPass());
if (PollyViewer)
PM.add(polly::createDOTViewerPass());
OpenPOWER on IntegriCloud