diff options
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/AliasAnalysisEvaluator.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Analysis/AliasSetTracker.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Analysis/IPA/FindUsedTypes.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 |
5 files changed, 17 insertions, 17 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp b/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp index 19d44dd9c85..ef7b5015f19 100644 --- a/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -83,15 +83,15 @@ bool AAEval::runOnFunction(Function &F) { Pointers.insert(I); for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { - if (isa<PointerType>((*I)->getType())) // Add all pointer instructions - Pointers.insert(*I); - for (User::op_iterator OI = (*I)->op_begin(); OI != (*I)->op_end(); ++OI) + if (isa<PointerType>(I->getType())) // Add all pointer instructions + Pointers.insert(&*I); + for (User::op_iterator OI = (*I).op_begin(); OI != (*I).op_end(); ++OI) if (isa<PointerType>((*OI)->getType())) Pointers.insert(*OI); } for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { - CallSite CS = CallSite::get(*I); + CallSite CS = CallSite::get(&*I); if (CS.getInstruction()) CallSites.insert(CS); } diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index 303d7987b79..82b6edec935 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -366,7 +366,7 @@ namespace { Tracker = new AliasSetTracker(getAnalysis<AliasAnalysis>()); for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) - Tracker->add(*I); + Tracker->add(&*I); return false; } diff --git a/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp index 45f5b72ecf9..67ab52d8a8a 100644 --- a/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp +++ b/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp @@ -42,8 +42,8 @@ static cl::opt<bool> PrintFailures("printunsafeptrinst", cl::Hidden, cl::desc("Print Unsafe Pointer Access Instructions")); -static inline bool isSafeInstruction(const Instruction *I) { - switch (I->getOpcode()) { +static inline bool isSafeInstruction(const Instruction &I) { + switch (I.getOpcode()) { case Instruction::Alloca: case Instruction::Malloc: case Instruction::Free: @@ -72,7 +72,7 @@ bool FindUnsafePointerTypes::run(Module &Mod) { if (PrintFailures) { CachedWriter CW(F->getParent(), std::cerr); CW << "FindUnsafePointerTypes: Type '" << ITy - << "' marked unsafe in '" << F->getName() << "' by:\n" << **I; + << "' marked unsafe in '" << F->getName() << "' by:\n" << *I; } } } diff --git a/llvm/lib/Analysis/IPA/FindUsedTypes.cpp b/llvm/lib/Analysis/IPA/FindUsedTypes.cpp index e930499e2e2..870f5716a36 100644 --- a/llvm/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/llvm/lib/Analysis/IPA/FindUsedTypes.cpp @@ -79,11 +79,11 @@ bool FindUsedTypes::run(Module &m) { // for (const_inst_iterator II = inst_begin(F), IE = inst_end(F); II != IE; ++II) { - const Instruction *I = *II; - const Type *Ty = I->getType(); + const Instruction &I = *II; + const Type *Ty = I.getType(); IncorporateType(Ty); // Incorporate the type of the instruction - for (User::const_op_iterator OI = I->op_begin(), OE = I->op_end(); + for (User::const_op_iterator OI = I.op_begin(), OE = I.op_end(); OI != OE; ++OI) IncorporateValue(*OI); // Insert inst operand types as well } diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 68cad3c0e23..ae3aa411f2b 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2175,22 +2175,22 @@ void ScalarEvolution::print(std::ostream &OS) const { OS << "Classifying expressions for: " << F.getName() << "\n"; for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) - if ((*I)->getType()->isInteger()) { - OS << **I; + if (I->getType()->isInteger()) { + OS << *I; OS << " --> "; - SCEVHandle SV = getSCEV(*I); + SCEVHandle SV = getSCEV(&*I); SV->print(OS); OS << "\t\t"; - if ((*I)->getType()->isIntegral()) { + if ((*I).getType()->isIntegral()) { ConstantRange Bounds = SV->getValueRange(); if (!Bounds.isFullSet()) OS << "Bounds: " << Bounds << " "; } - if (const Loop *L = LI.getLoopFor((*I)->getParent())) { + if (const Loop *L = LI.getLoopFor((*I).getParent())) { OS << "Exits: "; - SCEVHandle ExitValue = getSCEVAtScope(*I, L->getParentLoop()); + SCEVHandle ExitValue = getSCEVAtScope(&*I, L->getParentLoop()); if (isa<SCEVCouldNotCompute>(ExitValue)) { OS << "<<Unknown>>"; } else { |