mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Optimize this test. Firstly, only Instructions may use other Instructions.
Secondly, checking whether removal succeeded tells you whether it was in the map to begin with. llvm-svn: 37469
This commit is contained in:
parent
7b433a2954
commit
2897eb89d0
@ -1210,8 +1210,8 @@ void ScalarEvolutionsImpl::deleteInstructionFromRecords(Instruction *I) {
|
||||
|
||||
for (Instruction::use_iterator UI = II->use_begin(), UE = II->use_end();
|
||||
UI != UE; ++UI) {
|
||||
Instruction *Inst = dyn_cast<Instruction>(*UI);
|
||||
if (Inst && hasSCEV(Inst) && Scalars.erase(Inst)) {
|
||||
Instruction *Inst = cast<Instruction>(*UI);
|
||||
if (Scalars.erase(Inst)) {
|
||||
if (PHINode *PN = dyn_cast<PHINode>(II))
|
||||
ConstantEvolutionLoopExitValue.erase(PN);
|
||||
Worklist.push_back(Inst);
|
||||
|
Loading…
Reference in New Issue
Block a user