diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-30 22:53:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-30 22:53:53 +0000 |
commit | c74cb8698f1771603a6ab008277a407c55e47753 (patch) | |
tree | 9497db4fb301ee674021fe83d8bfdd8c6392be2e /lib/Analysis | |
parent | 2964f3624c38247d1954927754c1933400dae0d6 (diff) | |
download | external_llvm-c74cb8698f1771603a6ab008277a407c55e47753.zip external_llvm-c74cb8698f1771603a6ab008277a407c55e47753.tar.gz external_llvm-c74cb8698f1771603a6ab008277a407c55e47753.tar.bz2 |
- Eliminate the last traces of the 'analysis' namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/Expressions.cpp | 7 | ||||
-rw-r--r-- | lib/Analysis/InductionVariable.cpp | 11 |
2 files changed, 5 insertions, 13 deletions
diff --git a/lib/Analysis/Expressions.cpp b/lib/Analysis/Expressions.cpp index f4f76af..7901b14 100644 --- a/lib/Analysis/Expressions.cpp +++ b/lib/Analysis/Expressions.cpp @@ -10,11 +10,6 @@ #include "llvm/Analysis/Expressions.h" #include "llvm/ConstantHandling.h" #include "llvm/Function.h" -#include "llvm/BasicBlock.h" -#include "llvm/Instruction.h" -#include <iostream> - -using namespace analysis; ExprType::ExprType(Value *Val) { if (Val) @@ -233,7 +228,7 @@ static inline ExprType negate(const ExprType &E, Value *V) { // Note that this analysis cannot get into infinite loops because it treats PHI // nodes as being an unknown linear expression. // -ExprType analysis::ClassifyExpression(Value *Expr) { +ExprType ClassifyExpression(Value *Expr) { assert(Expr != 0 && "Can't classify a null expression!"); if (Expr->getType() == Type::FloatTy || Expr->getType() == Type::DoubleTy) return Expr; // FIXME: Can't handle FP expressions diff --git a/lib/Analysis/InductionVariable.cpp b/lib/Analysis/InductionVariable.cpp index 485586a..5703d6d 100644 --- a/lib/Analysis/InductionVariable.cpp +++ b/lib/Analysis/InductionVariable.cpp @@ -25,9 +25,6 @@ #include "llvm/Constants.h" #include "llvm/Assembly/Writer.h" -using analysis::ExprType; - - static bool isLoopInvariant(const Value *V, const Loop *L) { if (isa<Constant>(V) || isa<Argument>(V) || isa<GlobalValue>(V)) return true; @@ -85,8 +82,8 @@ InductionVariable::InductionVariable(PHINode *P, LoopInfo *LoopInfo) { Value *V2 = Phi->getIncomingValue(1); if (L == 0) { // No loop information? Base everything on expression analysis - ExprType E1 = analysis::ClassifyExpression(V1); - ExprType E2 = analysis::ClassifyExpression(V2); + ExprType E1 = ClassifyExpression(V1); + ExprType E2 = ClassifyExpression(V2); if (E1.ExprTy > E2.ExprTy) // Make E1 be the simpler expression std::swap(E1, E2); @@ -128,7 +125,7 @@ InductionVariable::InductionVariable(PHINode *P, LoopInfo *LoopInfo) { } if (Step == 0) { // Unrecognized step value... - ExprType StepE = analysis::ClassifyExpression(V2); + ExprType StepE = ClassifyExpression(V2); if (StepE.ExprTy != ExprType::Linear || StepE.Var != Phi) return; @@ -136,7 +133,7 @@ InductionVariable::InductionVariable(PHINode *P, LoopInfo *LoopInfo) { if (isa<PointerType>(ETy)) ETy = Type::ULongTy; Step = (Value*)(StepE.Offset ? StepE.Offset : ConstantInt::get(ETy, 0)); } else { // We were able to get a step value, simplify with expr analysis - ExprType StepE = analysis::ClassifyExpression(Step); + ExprType StepE = ClassifyExpression(Step); if (StepE.ExprTy == ExprType::Linear && StepE.Offset == 0) { // No offset from variable? Grab the variable Step = StepE.Var; |