projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cfc91c
)
[Constant Hoisting] Erase dead cast instructions.
author
Juergen Ributzka
<juergen@apple.com>
Sat, 22 Mar 2014 01:49:30 +0000
(
01:49
+0000)
committer
Juergen Ributzka
<juergen@apple.com>
Sat, 22 Mar 2014 01:49:30 +0000
(
01:49
+0000)
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
lib/Transforms/Scalar/ConstantHoisting.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/ConstantHoisting.cpp
b/lib/Transforms/Scalar/ConstantHoisting.cpp
index ce2e7eb6bf22eb6681e3b27b787ef8bf4f752454..cd0801d1efa50ca7338910bc6523a6114e276a17 100644
(file)
--- a/
lib/Transforms/Scalar/ConstantHoisting.cpp
+++ b/
lib/Transforms/Scalar/ConstantHoisting.cpp
@@
-595,7
+595,7
@@
bool ConstantHoisting::emitBaseConstants() {
void ConstantHoisting::deleteDeadCastInst() const {
for (auto const &I : ClonedCastMap)
if (I.first->use_empty())
- I.first->
remov
eFromParent();
+ I.first->
eras
eFromParent();
}
/// \brief Optimize expensive integer constants in the given function.