From b9b2b309d3195d9e2ed1e72da8566a470783e8d7 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sun, 11 Jun 2006 09:32:57 +0000 Subject: [PATCH] Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28747 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/LoopInfo.h | 5 +---- lib/Analysis/LoopInfo.cpp | 16 ---------------- lib/Transforms/Scalar/LoopUnswitch.cpp | 4 ---- lib/Transforms/Utils/LCSSA.cpp | 4 +--- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index d6d6edf5c08..06b007cf3fc 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -98,7 +98,7 @@ public: /// isLoopInvariant - Return true if the specified value is loop invariant /// bool isLoopInvariant(Value *V) const; - + //===--------------------------------------------------------------------===// // APIs for simple analysis of the loop. // @@ -147,9 +147,6 @@ public: /// Value *getTripCount() const; - /// isLCSSAForm - Return true if the Loop is in LCSSA form - bool isLCSSAForm() const; - //===--------------------------------------------------------------------===// // APIs for updating loop information after changing the CFG // diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index eed2cd6c4ef..c7ce58ef915 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -479,22 +479,6 @@ Value *Loop::getTripCount() const { return 0; } -/// isLCSSAForm - Return true if the Loop is in LCSSA form -bool Loop::isLCSSAForm() const { - for (Loop::block_iterator BB = block_begin(), E = block_end(); - BB != E; ++BB) { - for (BasicBlock::iterator I = (*BB)->begin(), E = (*BB)->end(); I != E; ++I) - for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; - ++UI) { - BasicBlock *UserBB = cast(*UI)->getParent(); - if (!isa(*UI) && !contains(UserBB)) { - return false; - } - } - } - - return true; -} //===-------------------------------------------------------------------===// // APIs for updating loop information after changing the CFG diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index ab736c1de87..c583eea14d6 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -73,8 +73,6 @@ namespace { AU.addPreservedID(LoopSimplifyID); AU.addRequired(); AU.addPreserved(); - AU.addRequiredID(LCSSAID); - AU.addPreservedID(LCSSAID); } private: @@ -201,8 +199,6 @@ bool LoopUnswitch::visitLoop(Loop *L) { } } - assert(L->isLCSSAForm()); - return Changed; } diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp index ecbf1804383..e1af50e7454 100644 --- a/lib/Transforms/Utils/LCSSA.cpp +++ b/lib/Transforms/Utils/LCSSA.cpp @@ -98,7 +98,7 @@ bool LCSSA::runOnFunction(Function &F) { for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) { changed |= visitSubloop(*I); } - + return changed; } @@ -132,8 +132,6 @@ bool LCSSA::visitSubloop(Loop* L) { processInstruction(*I, exitBlocks); } - assert(L->isLCSSAForm()); - return true; }