X86InstrInfo: No need for liveness analysis in classifyLEAReg()
authorMatthias Braun <matze@braunis.de>
Thu, 21 Jul 2016 00:33:38 +0000 (00:33 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 21 Jul 2016 00:33:38 +0000 (00:33 +0000)
commitca8210a952f6f072292cb0d0f196b7e69f4914f3
tree2c269e997f9a48ad6c4ef29f7b68d55ee458a081
parent0753c06d9cfd7cbb6af1ed13af073cc274522862
X86InstrInfo: No need for liveness analysis in classifyLEAReg()

classifyLEAReg() deals with switching operands from 32bit to 64bit in
order to use a LEA64_32 instruction (for three address code goodness).
It currently performs a liveness analysis to determine the kill/undef
flag for the newly added operand. This should not be necessary:

- If the previous operand had a kill flag, then the 32bit part of the
  register gets killed, this will kill the super register as well.
- If the previous operand had an undef flag then we didn't care what
  value we read, just use the same flag on the new operand.
  (No matter what an operand with an undef flag won't affect liveness)

This makes the code independent of the presence of kill flags because it
avoids a call to MachineBasicBlock::computeRegisterLiveness().

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

llvm-svn: 276222
llvm/lib/Target/X86/X86InstrInfo.cpp