[polly] r184001 - scop detection: inline and remove isValidBasicBlock
Sebastian Pop
spop at codeaurora.org
Fri Jun 14 13:20:43 PDT 2013
Author: spop
Date: Fri Jun 14 15:20:43 2013
New Revision: 184001
URL: http://llvm.org/viewvc/llvm-project?rev=184001&view=rev
Log:
scop detection: inline and remove isValidBasicBlock
Modified:
polly/trunk/include/polly/ScopDetection.h
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/include/polly/ScopDetection.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopDetection.h?rev=184001&r1=184000&r2=184001&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetection.h (original)
+++ polly/trunk/include/polly/ScopDetection.h Fri Jun 14 15:20:43 2013
@@ -171,14 +171,6 @@ class ScopDetection : public FunctionPas
/// @return True if the instruction is valid, false otherwise.
bool isValidInstruction(Instruction &Inst, DetectionContext &Context) const;
- /// @brief Check if the BB can be part of a Scop.
- ///
- /// @param BB The basic block to check.
- /// @param Context The context of scop detection.
- ///
- /// @return True if the basic block is valid, false otherwise.
- bool isValidBasicBlock(BasicBlock &BB, DetectionContext &Context) const;
-
/// @brief Check if the control flow in a basic block is valid.
///
/// @param BB The BB to check the control flow.
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=184001&r1=184000&r2=184001&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Fri Jun 14 15:20:43 2013
@@ -360,16 +360,6 @@ bool ScopDetection::isValidInstruction(I
INVALID(Other, "Unknown instruction: " << Inst);
}
-bool ScopDetection::isValidBasicBlock(BasicBlock &BB,
- DetectionContext &Context) const {
- // Check all instructions, except the terminator instruction.
- for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I)
- if (!isValidInstruction(*I, Context))
- return false;
-
- return true;
-}
-
bool ScopDetection::isValidLoop(Loop *L, DetectionContext &Context) const {
if (!SCEVCodegen) {
// If code generation is not in scev based mode, we need to ensure that
@@ -517,10 +507,12 @@ bool ScopDetection::allBlocksValid(Detec
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;
+ for (Region::block_iterator BI = R.block_begin(), E = R.block_end(); BI != E;
+ ++BI)
+ for (BasicBlock::iterator I = (*BI)->begin(), E = --(*BI)->end(); I != E;
+ ++I)
+ if (!isValidInstruction(*I, Context))
+ return false;
return true;
}
More information about the llvm-commits
mailing list