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:
67ccb29
)
Eliminate dead code after remat.
author
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Sat, 19 May 2012 05:25:59 +0000
(
05:25
+0000)
committer
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Sat, 19 May 2012 05:25:59 +0000
(
05:25
+0000)
This will remove the original def once it has no more uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157104
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/RegisterCoalescer.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/RegisterCoalescer.cpp
b/lib/CodeGen/RegisterCoalescer.cpp
index 3204eff9cbb0227f352097d916e9a57c7e5b1631..7126bdd16740684206424925320e718b185e1b39 100644
(file)
--- a/
lib/CodeGen/RegisterCoalescer.cpp
+++ b/
lib/CodeGen/RegisterCoalescer.cpp
@@
-870,7
+870,9
@@
bool RegisterCoalescer::reMaterializeTrivialDef(LiveInterval &SrcInt,
++NumReMats;
// The source interval can become smaller because we removed a use.
- LIS->shrinkToUses(&SrcInt);
+ LIS->shrinkToUses(&SrcInt, &DeadDefs);
+ if (!DeadDefs.empty())
+ eliminateDeadDefs();
return true;
}