diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 | 
| commit | 58b69754af0cbff56b1cfce9be9392e4451f6628 (patch) | |
| tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /lib/Analysis/LoopInfo.cpp | |
| parent | 0378662f5bd3dbe8305a485b0282bceb8b52f465 (diff) | |
Notes
Diffstat (limited to 'lib/Analysis/LoopInfo.cpp')
| -rw-r--r-- | lib/Analysis/LoopInfo.cpp | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index f7a60a1737d4b..20c33a3d9d618 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -18,6 +18,7 @@  #include "llvm/Constants.h"  #include "llvm/Instructions.h"  #include "llvm/Analysis/Dominators.h" +#include "llvm/Analysis/LoopInfoImpl.h"  #include "llvm/Analysis/LoopIterator.h"  #include "llvm/Analysis/ValueTracking.h"  #include "llvm/Assembly/Writer.h" @@ -29,6 +30,10 @@  #include <algorithm>  using namespace llvm; +// Explicitly instantiate methods in LoopInfoImpl.h for IR-level Loops. +template class llvm::LoopBase<BasicBlock, Loop>; +template class llvm::LoopInfoBase<BasicBlock, Loop>; +  // Always verify loopinfo if expensive checking is enabled.  #ifdef XDEBUG  static bool VerifyLoopInfo = true; @@ -507,7 +512,7 @@ Loop *UnloopUpdater::getNearestLoop(BasicBlock *BB, Loop *BBLoop) {  //  bool LoopInfo::runOnFunction(Function &) {    releaseMemory(); -  LI.Calculate(getAnalysis<DominatorTree>().getBase());    // Update +  LI.Analyze(getAnalysis<DominatorTree>().getBase());    return false;  } @@ -589,9 +594,6 @@ void LoopInfo::verifyAnalysis() const {    }    // Verify that blocks are mapped to valid loops. -  // -  // FIXME: With an up-to-date DFS (see LoopIterator.h) and DominatorTree, we -  // could also verify that the blocks are still in the correct loops.    for (DenseMap<BasicBlock*, Loop*>::const_iterator I = LI.BBMap.begin(),           E = LI.BBMap.end(); I != E; ++I) {      assert(Loops.count(I->second) && "orphaned loop");  | 
