mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
[Constant Hoisting] Erase dead cast instructions.
The cleanup code that removes dead cast instructions only removed them from the basic block, but didn't delete them. This fix erases them now too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204538 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5cfc91c9a5
commit
62f4b48fc1
@ -595,7 +595,7 @@ bool ConstantHoisting::emitBaseConstants() {
|
||||
void ConstantHoisting::deleteDeadCastInst() const {
|
||||
for (auto const &I : ClonedCastMap)
|
||||
if (I.first->use_empty())
|
||||
I.first->removeFromParent();
|
||||
I.first->eraseFromParent();
|
||||
}
|
||||
|
||||
/// \brief Optimize expensive integer constants in the given function.
|
||||
|
Loading…
Reference in New Issue
Block a user