Speed up SCoP detection time by checking the exit of the region first,

patched by Johannes Doerfert <johannes@jdoerfert.de>.

llvm-svn: 154258
This commit is contained in:
Hongbin Zheng 2012-04-07 12:29:17 +00:00
parent c2b5c67df3
commit 94868e6cc6
1 changed files with 2 additions and 2 deletions

View File

@ -508,10 +508,10 @@ bool ScopDetection::isValidRegion(DetectionContext &Context) const {
if (!R.isSimple())
INVALID(SimpleRegion, "Region not simple: " << R.getNameStr());
if (!allBlocksValid(Context))
if (!isValidExit(Context))
return false;
if (!isValidExit(Context))
if (!allBlocksValid(Context))
return false;
DEBUG(dbgs() << "OK\n");