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)
commit60d69e2865b2dfe62f689274b6346919250b5250
tree464db5d51576cc74d64c4437bb76e7e65c377e0d
parent742afdb3d285d579e10fe6cde67f21bdb661d862
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

llvm-svn: 255362
llvm/include/llvm/CodeGen/MachineBasicBlock.h
llvm/include/llvm/CodeGen/MachineInstrBundle.h
llvm/lib/CodeGen/InlineSpiller.cpp
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/lib/CodeGen/MachineInstrBundle.cpp
llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/cmpxchg-clobber-flags.ll
llvm/test/CodeGen/X86/peephole-na-phys-copy-folding.ll