[polly] r183797 - scop detection: run isValidCFG as early as possible
Sebastian Pop
spop at codeaurora.org
Tue Jun 11 15:20:27 PDT 2013
Author: spop
Date: Tue Jun 11 17:20:27 2013
New Revision: 183797
URL: http://llvm.org/viewvc/llvm-project?rev=183797&view=rev
Log:
scop detection: run isValidCFG as early as possible
to discard regions with invalid CFG before going through the contents of the
basic blocks
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=183797&r1=183796&r2=183797&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Tue Jun 11 17:20:27 2013
@@ -390,9 +390,6 @@ bool ScopDetection::isValidInstruction(I
bool ScopDetection::isValidBasicBlock(BasicBlock &BB,
DetectionContext &Context) const {
- if (!isValidCFG(BB, Context))
- return false;
-
// Check all instructions, except the terminator instruction.
for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I)
if (!isValidInstruction(*I, Context))
@@ -542,6 +539,11 @@ bool ScopDetection::allBlocksValid(Detec
for (Region::block_iterator I = R.block_begin(), E = R.block_end(); I != E;
++I)
+ if (!isValidCFG(**I, Context))
+ return false;
+
+ for (Region::block_iterator I = R.block_begin(), E = R.block_end(); I != E;
+ ++I)
if (!isValidBasicBlock(**I, Context))
return false;
More information about the llvm-commits
mailing list