It is safe to remat a value killed by phis.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 15 Sep 2011 04:52:06 +0000 (04:52 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 15 Sep 2011 04:52:06 +0000 (04:52 +0000)
commit4ea24e993f179113a9bb76ee152cc490e738c936
tree1673ff9bb070016265ee0be189d534b1d3cebdb1
parent573a32d4870ff4af7f59fc020caf07fb6ef61e37
It is safe to remat a value killed by phis.

The source live range is recomputed using shrinkToUses() which does
handle phis correctly.  The hasPHIKill() condition was relevant in the
old days when ReMaterializeTrivialDef() tried to recompute the live
range itself.

The shrinkToUses() function will mark the original def as dead when no
more uses and phi kills remain.  It is then removed by
runOnMachineFunction().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139781 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterCoalescer.cpp