summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DivergenceAnalysis.cpp6
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp2
-rw-r--r--llvm/lib/Analysis/MemDepPrinter.cpp4
-rw-r--r--llvm/lib/Analysis/MemDerefPrinter.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/DivergenceAnalysis.cpp b/llvm/lib/Analysis/DivergenceAnalysis.cpp
index e5ee2959c15..f3fc7844020 100644
--- a/llvm/lib/Analysis/DivergenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DivergenceAnalysis.cpp
@@ -159,7 +159,7 @@ private:
void DivergencePropagator::populateWithSourcesOfDivergence() {
Worklist.clear();
DV.clear();
- for (auto &I : inst_range(F)) {
+ for (auto &I : instructions(F)) {
if (TTI.isSourceOfDivergence(&I)) {
Worklist.push_back(&I);
DV.insert(&I);
@@ -329,8 +329,8 @@ void DivergenceAnalysis::print(raw_ostream &OS, const Module *) const {
if (DivergentValues.count(&Arg))
OS << "DIVERGENT: " << Arg << "\n";
}
- // Iterate instructions using inst_range to ensure a deterministic order.
- for (auto &I : inst_range(F)) {
+ // Iterate instructions using instructions() to ensure a deterministic order.
+ for (auto &I : instructions(F)) {
if (DivergentValues.count(&I))
OS << "DIVERGENT:" << I << "\n";
}
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index 4345f6b6813..f7b55c2cf8f 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -627,7 +627,7 @@ void GlobalsModRef::AnalyzeCallGraph(CallGraph &CG, Module &M) {
for (auto *Node : SCC) {
if (FI.getModRefInfo() == MRI_ModRef)
break; // The mod/ref lattice saturates here.
- for (Instruction &I : inst_range(Node->getFunction())) {
+ for (Instruction &I : instructions(Node->getFunction())) {
if (FI.getModRefInfo() == MRI_ModRef)
break; // The mod/ref lattice saturates here.
diff --git a/llvm/lib/Analysis/MemDepPrinter.cpp b/llvm/lib/Analysis/MemDepPrinter.cpp
index da3b829b6d3..4d7c9b040b5 100644
--- a/llvm/lib/Analysis/MemDepPrinter.cpp
+++ b/llvm/lib/Analysis/MemDepPrinter.cpp
@@ -96,7 +96,7 @@ bool MemDepPrinter::runOnFunction(Function &F) {
// All this code uses non-const interfaces because MemDep is not
// const-friendly, though nothing is actually modified.
- for (auto &I : inst_range(F)) {
+ for (auto &I : instructions(F)) {
Instruction *Inst = &I;
if (!Inst->mayReadFromMemory() && !Inst->mayWriteToMemory())
@@ -135,7 +135,7 @@ bool MemDepPrinter::runOnFunction(Function &F) {
}
void MemDepPrinter::print(raw_ostream &OS, const Module *M) const {
- for (const auto &I : inst_range(*F)) {
+ for (const auto &I : instructions(*F)) {
const Instruction *Inst = &I;
DepSetMap::const_iterator DI = Deps.find(Inst);
diff --git a/llvm/lib/Analysis/MemDerefPrinter.cpp b/llvm/lib/Analysis/MemDerefPrinter.cpp
index fa292a28ec8..ef2de41e120 100644
--- a/llvm/lib/Analysis/MemDerefPrinter.cpp
+++ b/llvm/lib/Analysis/MemDerefPrinter.cpp
@@ -51,7 +51,7 @@ FunctionPass *llvm::createMemDerefPrinter() {
bool MemDerefPrinter::runOnFunction(Function &F) {
const DataLayout &DL = F.getParent()->getDataLayout();
- for (auto &I: inst_range(F)) {
+ for (auto &I: instructions(F)) {
if (LoadInst *LI = dyn_cast<LoadInst>(&I)) {
Value *PO = LI->getPointerOperand();
if (isDereferenceablePointer(PO, DL))
OpenPOWER on IntegriCloud