Use dyn_cast instead of isa and cast. No functionality change.

llvm-svn: 169196
This commit is contained in:
Jakub Staszak 2012-12-04 00:50:06 +00:00
parent 3ba9b62972
commit ad1ddb8aa6

View File

@ -1006,12 +1006,12 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
if (AllPredsVisited) { if (AllPredsVisited) {
for (BasicBlock::const_iterator I = LLVMBB->begin(); for (BasicBlock::const_iterator I = LLVMBB->begin();
isa<PHINode>(I); ++I) const PHINode *PN = dyn_cast<PHINode>(I); ++I)
FuncInfo->ComputePHILiveOutRegInfo(cast<PHINode>(I)); FuncInfo->ComputePHILiveOutRegInfo(PN);
} else { } else {
for (BasicBlock::const_iterator I = LLVMBB->begin(); for (BasicBlock::const_iterator I = LLVMBB->begin();
isa<PHINode>(I); ++I) const PHINode *PN = dyn_cast<PHINode>(I); ++I)
FuncInfo->InvalidatePHILiveOutRegInfo(cast<PHINode>(I)); FuncInfo->InvalidatePHILiveOutRegInfo(PN);
} }
FuncInfo->VisitedBBs.insert(LLVMBB); FuncInfo->VisitedBBs.insert(LLVMBB);