1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

[unroll] Remove pointless dyn_cast<>s to Instruction - the users of an

instruction must by definition be instructions.

llvm-svn: 229061
This commit is contained in:
Chandler Carruth 2015-02-13 04:33:21 +00:00
parent 93d5cf945c
commit 8d0faf7531

View File

@ -468,12 +468,8 @@ public:
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
@ -485,12 +481,8 @@ public:
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;
}