mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
Eliminate dead code after remat.
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
This commit is contained in:
parent
67ccb29cec
commit
1dc6d7cbb5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user