CodeGen: Redo analyzePhysRegs() and computeRegisterLiveness()
authorMatthias Braun <matze@braunis.de>
Fri, 11 Dec 2015 19:42:09 +0000 (19:42 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 11 Dec 2015 19:42:09 +0000 (19:42 +0000)
commitf43272c76e2e0ba56d26f0e4b54dccb3e38628b0
treead9f62961b180b1a7c1bc2613c1682aa25f734e9
parent0e0cc9459a89ac4f5e4cb5003d223a974c2d4d94
CodeGen: Redo analyzePhysRegs() and computeRegisterLiveness()

computeRegisterLiveness() was broken in that it reported dead for a
register even if a subregister was alive. I assume this was because the
results of analayzePhysRegs() are hard to understand with respect to
subregisters.

This commit: Changes the results of analyzePhysRegs (=struct
PhysRegInfo) to be clearly understandable, also renames the fields to
avoid silent breakage of third-party code (and improve the grammar).

Fix all (two) users of computeRegisterLiveness() in llvm: By reenabling
it and removing workarounds for the bug.

This fixes http://llvm.org/PR24535 and http://llvm.org/PR25033

Differential Revision: http://reviews.llvm.org/D15320

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255362 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineBasicBlock.h
include/llvm/CodeGen/MachineInstrBundle.h
lib/CodeGen/InlineSpiller.cpp
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/MachineInstrBundle.cpp
lib/Target/AArch64/AArch64ConditionalCompares.cpp
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/cmpxchg-clobber-flags.ll
test/CodeGen/X86/peephole-na-phys-copy-folding.ll