[llvm-commits] [polly] r154259 - /polly/trunk/lib/Analysis/ScopDetection.cpp
Hongbin Zheng
etherzhhb at gmail.com
Sat Apr 7 05:29:27 PDT 2012
Author: ether
Date: Sat Apr 7 07:29:27 2012
New Revision: 154259
URL: http://llvm.org/viewvc/llvm-project?rev=154259&view=rev
Log:
ScopDetection: Add some comments to function "expandRegion".
Modified:
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=154259&r1=154258&r2=154259&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Sat Apr 7 07:29:27 2012
@@ -385,16 +385,22 @@
DetectionContext Context(*TmpRegion, *AA, false /*verifying*/);
DEBUG(dbgs() << "\t\tTrying " << TmpRegion->getNameStr() << "\n");
+ // Stop the expansion if there is any invalid block.
if (!allBlocksValid(Context))
break;
if (isValidExit(Context)) {
+ // If TmpRegion also has a valid exit, make it become the cadidate of the
+ // largest region as a valid SCoP.
if (CurrentRegion != &R)
delete CurrentRegion;
CurrentRegion = TmpRegion;
}
+ // Go on expand the region to find the largest region as a valid SCoP no
+ // matter it has a valid exit or not, because the expanded region may has
+ // a valid exit.
Region *TmpRegion2 = TmpRegion->getExpandedRegion();
if (TmpRegion != &R && TmpRegion != CurrentRegion)
More information about the llvm-commits
mailing list