diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-19 05:25:59 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-19 05:25:59 +0000 |
| commit | 900f58441d556146bd773db5023c3565d519b165 (patch) | |
| tree | b390adc8faf62010e3cd27094be7f9270700abd5 /llvm/lib | |
| parent | dcffc626c0fb352dc40c8a1120b90dd51ecc4761 (diff) | |
| download | bcm5719-llvm-900f58441d556146bd773db5023c3565d519b165.tar.gz bcm5719-llvm-900f58441d556146bd773db5023c3565d519b165.zip | |
Eliminate dead code after remat.
This will remove the original def once it has no more uses.
llvm-svn: 157104
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 3204eff9cbb..7126bdd1674 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/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; } |

