aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-12-18 16:43:17 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-12-18 16:43:17 +0000
commitd000e1dc2f08892aaa8c1bfd96f85f24b9d66cbb (patch)
treea94bbbc019f6bc614cc8fc720a48c13366f400c0 /lib/Transforms/Scalar
parenta71e05acdd7c6a8e815db46b5fb6dc1d87826aab (diff)
downloadexternal_llvm-d000e1dc2f08892aaa8c1bfd96f85f24b9d66cbb.zip
external_llvm-d000e1dc2f08892aaa8c1bfd96f85f24b9d66cbb.tar.gz
external_llvm-d000e1dc2f08892aaa8c1bfd96f85f24b9d66cbb.tar.bz2
Merged in RELEASE_11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 763854e..0cc408c 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -15,19 +15,19 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Scalar.h"
-#include "llvm/Constants.h"
-#include "llvm/Type.h"
-#include "llvm/iPHINode.h"
-#include "llvm/iOther.h"
#include "llvm/Analysis/InductionVariable.h"
#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/iPHINode.h"
+#include "llvm/iOther.h"
+#include "llvm/Type.h"
+#include "llvm/Constants.h"
#include "llvm/Support/CFG.h"
-#include "llvm/Transforms/Utils/Local.h"
#include "Support/Debug.h"
#include "Support/Statistic.h"
#include "Support/STLExtras.h"
#include <algorithm>
-using namespace llvm;
+
+namespace llvm {
namespace {
Statistic<> NumRemoved ("indvars", "Number of aux indvars removed");
@@ -141,8 +141,6 @@ static bool TransformLoop(LoopInfo *Loops, Loop *Loop) {
DEBUG(IV->print(std::cerr));
- while (isa<PHINode>(AfterPHIIt)) ++AfterPHIIt;
-
// Don't do math with pointers...
const Type *IVTy = IV->Phi->getType();
if (isa<PointerType>(IVTy)) IVTy = Type::ULongTy;
@@ -188,12 +186,6 @@ static bool TransformLoop(LoopInfo *Loops, Loop *Loop) {
IV->Phi->setName("");
Val->setName(OldName);
- // Get the incoming values used by the PHI node
- std::vector<Value*> PHIOps;
- PHIOps.reserve(IV->Phi->getNumIncomingValues());
- for (unsigned i = 0, e = IV->Phi->getNumIncomingValues(); i != e; ++i)
- PHIOps.push_back(IV->Phi->getIncomingValue(i));
-
// Delete the old, now unused, phi node...
Header->getInstList().erase(IV->Phi);
@@ -250,7 +242,8 @@ namespace {
"Canonicalize Induction Variables");
}
-Pass *llvm::createIndVarSimplifyPass() {
+Pass *createIndVarSimplifyPass() {
return new InductionVariableSimplify();
}
+} // End llvm namespace