[llvm-commits] [llvm] r169196 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Jakub Staszak
kubastaszak at gmail.com
Mon Dec 3 16:50:07 PST 2012
Author: kuba
Date: Mon Dec 3 18:50:06 2012
New Revision: 169196
URL: http://llvm.org/viewvc/llvm-project?rev=169196&view=rev
Log:
Use dyn_cast instead of isa and cast. No functionality change.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=169196&r1=169195&r2=169196&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Dec 3 18:50:06 2012
@@ -1006,12 +1006,12 @@
if (AllPredsVisited) {
for (BasicBlock::const_iterator I = LLVMBB->begin();
- isa<PHINode>(I); ++I)
- FuncInfo->ComputePHILiveOutRegInfo(cast<PHINode>(I));
+ const PHINode *PN = dyn_cast<PHINode>(I); ++I)
+ FuncInfo->ComputePHILiveOutRegInfo(PN);
} else {
for (BasicBlock::const_iterator I = LLVMBB->begin();
- isa<PHINode>(I); ++I)
- FuncInfo->InvalidatePHILiveOutRegInfo(cast<PHINode>(I));
+ const PHINode *PN = dyn_cast<PHINode>(I); ++I)
+ FuncInfo->InvalidatePHILiveOutRegInfo(PN);
}
FuncInfo->VisitedBBs.insert(LLVMBB);
More information about the llvm-commits
mailing list