instruction must by definition be instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229061
91177308-0d34-0410-b5e6-
96231b3b80d8
if (CountedInstructions.insert(LI).second)
NumberOfOptimizedInstructions += TTI.getUserCost(LI);
if (CountedInstructions.insert(LI).second)
NumberOfOptimizedInstructions += TTI.getUserCost(LI);
- for (User *U : LI->users()) {
- Instruction *UI = dyn_cast<Instruction>(U);
- if (!UI)
- continue;
- Worklist.insert(UI);
- }
+ for (User *U : LI->users())
+ Worklist.insert(cast<Instruction>(U));
}
// And then we try to simplify every user of every instruction from the
}
// And then we try to simplify every user of every instruction from the
continue;
if (!visit(I))
continue;
continue;
if (!visit(I))
continue;
- for (User *U : I->users()) {
- Instruction *UI = dyn_cast<Instruction>(U);
- if (!UI)
- continue;
- Worklist.insert(UI);
- }
+ for (User *U : I->users())
+ Worklist.insert(cast<Instruction>(U));
}
return NumberOfOptimizedInstructions;
}
}
return NumberOfOptimizedInstructions;
}