mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +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:
parent
2d38576d56
commit
17cc3c80ee
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user