diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-02-14 16:42:45 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-02-14 16:42:45 +0000 |
commit | d535f551460dfbc8b4279ff0f3d89b7f0996b5cb (patch) | |
tree | 72cd30558e35700ff32a4a8d508690ea0e69be35 /polly/lib/Support/ScopHelper.cpp | |
parent | d514fd59a611fae1e0fab615d6b4d28895958f80 (diff) | |
download | bcm5719-llvm-d535f551460dfbc8b4279ff0f3d89b7f0996b5cb.tar.gz bcm5719-llvm-d535f551460dfbc8b4279ff0f3d89b7f0996b5cb.zip |
Formatting fixes
llvm-svn: 175177
Diffstat (limited to 'polly/lib/Support/ScopHelper.cpp')
-rw-r--r-- | polly/lib/Support/ScopHelper.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp index 5614c4a8d98..ac26a1a27f7 100644 --- a/polly/lib/Support/ScopHelper.cpp +++ b/polly/lib/Support/ScopHelper.cpp @@ -41,13 +41,14 @@ Loop *polly::castToLoop(const Region &R, LoopInfo &LI) { BasicBlock *exit = L->getExitBlock(); // Is the loop with multiple exits? - if (!exit) return 0; + if (!exit) + return 0; if (exit != R.getExit()) { // SubRegion/ParentRegion with the same entry. - assert((R.getNode(R.getEntry())->isSubRegion() - || R.getParent()->getEntry() == entry) - && "Expect the loop is the smaller or bigger region"); + assert((R.getNode(R.getEntry())->isSubRegion() || + R.getParent()->getEntry() == entry) && + "Expect the loop is the smaller or bigger region"); return 0; } @@ -67,14 +68,15 @@ Value *polly::getPointerOperand(Instruction &Inst) { //===----------------------------------------------------------------------===// // Helper functions -bool polly::isIndVar(const SCEV *Var, Region &RefRegion, - LoopInfo &LI, ScalarEvolution &SE) { +bool polly::isIndVar(const SCEV *Var, Region &RefRegion, LoopInfo &LI, + ScalarEvolution &SE) { const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Var); // AddRecExprs are no induction variables. - if (!AddRec) return false; + if (!AddRec) + return false; - Loop *L = const_cast<Loop*>(AddRec->getLoop()); + Loop *L = const_cast<Loop *>(AddRec->getLoop()); // Is the addrec an induction variable of a loop contained in the current // region. @@ -82,7 +84,7 @@ bool polly::isIndVar(const SCEV *Var, Region &RefRegion, return false; DEBUG(dbgs() << "Find AddRec: " << *AddRec - << " at region: " << RefRegion.getNameStr() << " as indvar\n"); + << " at region: " << RefRegion.getNameStr() << " as indvar\n"); return true; } @@ -104,7 +106,7 @@ bool polly::hasInvokeEdge(const PHINode *PN) { BasicBlock *polly::createSingleExitEdge(Region *R, Pass *P) { BasicBlock *BB = R->getExit(); - SmallVector<BasicBlock*, 4> Preds; + SmallVector<BasicBlock *, 4> Preds; for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI != PE; ++PI) if (R->contains(*PI)) Preds.push_back(*PI); @@ -116,7 +118,8 @@ void polly::splitEntryBlockForAlloca(BasicBlock *EntryBlock, Pass *P) { // Find first non-alloca instruction. Every basic block has a non-alloc // instruction, as every well formed basic block has a terminator. BasicBlock::iterator I = EntryBlock->begin(); - while (isa<AllocaInst>(I)) ++I; + while (isa<AllocaInst>(I)) + ++I; // SplitBlock updates DT, DF and LI. BasicBlock *NewEntry = SplitBlock(EntryBlock, I, P); |