summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-12-30 15:27:33 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-12-30 15:27:33 +0000
commitc7fc81e6595865296738fe0f8ffe692ea41b1ffc (patch)
tree9c14093b59b87a53d42ecbeb9c263c85f46f97e3 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent06f6d262f99d4bc13739eb224084d239f5445682 (diff)
downloadbcm5719-llvm-c7fc81e6595865296738fe0f8ffe692ea41b1ffc.tar.gz
bcm5719-llvm-c7fc81e6595865296738fe0f8ffe692ea41b1ffc.zip
Use phi ranges to simplify code. No functionality change intended.
llvm-svn: 321585
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index d13ccc26371..befd797e75b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1445,13 +1445,11 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
}
if (AllPredsVisited) {
- for (BasicBlock::const_iterator I = LLVMBB->begin();
- const PHINode *PN = dyn_cast<PHINode>(I); ++I)
- FuncInfo->ComputePHILiveOutRegInfo(PN);
+ for (const PHINode &PN : LLVMBB->phis())
+ FuncInfo->ComputePHILiveOutRegInfo(&PN);
} else {
- for (BasicBlock::const_iterator I = LLVMBB->begin();
- const PHINode *PN = dyn_cast<PHINode>(I); ++I)
- FuncInfo->InvalidatePHILiveOutRegInfo(PN);
+ for (const PHINode &PN : LLVMBB->phis())
+ FuncInfo->InvalidatePHILiveOutRegInfo(&PN);
}
FuncInfo->VisitedBBs.insert(LLVMBB);
OpenPOWER on IntegriCloud