mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
[unroll] Remove pointless dyn_cast<>s to Instruction - the users of an
instruction must by definition be instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
2d38576d56
commit
17cc3c80ee
1 file changed
+4
-12
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user