diff options
author | Andrew Trick <atrick@apple.com> | 2011-08-04 01:04:37 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-08-04 01:04:37 +0000 |
commit | 0712108d22d5fdc5ea447ef701d843b25bd52d10 (patch) | |
tree | 848502ee7142c6693d1bde673973c128ba096f0d /include/llvm/Analysis/LoopInfo.h | |
parent | e651983e71a0fbe624a1441dfc8b747ca1a038f1 (diff) | |
download | external_llvm-0712108d22d5fdc5ea447ef701d843b25bd52d10.zip external_llvm-0712108d22d5fdc5ea447ef701d843b25bd52d10.tar.gz external_llvm-0712108d22d5fdc5ea447ef701d843b25bd52d10.tar.bz2 |
Reverting r136884 updateUnloop, which crashed a linux builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index f206aef..28a15ed 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -134,11 +134,6 @@ public: block_iterator block_begin() const { return Blocks.begin(); } block_iterator block_end() const { return Blocks.end(); } - /// getNumBlocks - Get the number of blocks in this loop. - unsigned getNumBlocks() const { - return std::distance(block_begin(), block_end()); - } - /// isLoopExiting - True if terminator in the block can branch to another /// block that is outside of the current loop. /// @@ -708,13 +703,9 @@ public: /// specified loop. This should be used by transformations that restructure /// the loop hierarchy tree. void changeLoopFor(BlockT *BB, LoopT *L) { - if (!L) { - typename DenseMap<BlockT *, LoopT *>::iterator I = BBMap.find(BB); - if (I != BBMap.end()) - BBMap.erase(I); - return; - } - BBMap[BB] = L; + LoopT *&OldLoop = BBMap[BB]; + assert(OldLoop && "Block not in a loop yet!"); + OldLoop = L; } /// changeTopLevelLoop - Replace the specified loop in the top-level loops @@ -1033,12 +1024,6 @@ public: LI.removeBlock(BB); } - /// updateUnloop - Update LoopInfo after removing the last backedge from a - /// loop--now the "unloop". This updates the loop forest and parent loops for - /// each block so that Unloop is no longer referenced, but the caller must - /// actually delete the Unloop object. - void updateUnloop(Loop *Unloop); - /// replacementPreservesLCSSAForm - Returns true if replacing From with To /// everywhere is guaranteed to preserve LCSSA form. bool replacementPreservesLCSSAForm(Instruction *From, Value *To) { |