RegisterCoalescer: Fix implicit def handling in register coalescer
authorMatthias Braun <matze@braunis.de>
Wed, 25 Mar 2015 21:18:24 +0000 (21:18 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 25 Mar 2015 21:18:24 +0000 (21:18 +0000)
commitca33fd798746c044e0585ecac9e9dfdea9cac9e5
tree9bd6cbe61fd25e873f817252292733d016ba383c
parentdffffd2ed31d1c822485e60037fa561abc009545
RegisterCoalescer: Fix implicit def handling in register coalescer

If liveranges induced by an IMPLICIT_DEF get completely covered by a
proper liverange the IMPLICIT_DEF instructions and its corresponding
definitions have to be removed from the live ranges. This has to happen
in the subregister live ranges as well (I didn't see this case earlier
because in most programs only some subregisters are covered and the
IMPLCIT_DEF won't get removed).

No testcase, I spent hours trying to create one for one of the public
targets, but ultimately failed because I couldn't manage to properly
control the placement of COPY and IMPLICIT_DEF instructions from an .ll
file.

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