OSDN Git Service

LivePhysRegs: Automatically determine presence of pristine regs.
authorMatthias Braun <matze@braunis.de>
Tue, 3 May 2016 00:08:46 +0000 (00:08 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 3 May 2016 00:08:46 +0000 (00:08 +0000)
commitb4756d6b2dc7d974aa45cbd7a4b21eb7fa20ddc9
treebe52fe329cf6a562d3fbda61f2bba614de979114
parent0414149591bddd9c0407a50148d20617ad7c3337
LivePhysRegs: Automatically determine presence of pristine regs.

Remove the AddPristinesAndCSRs parameters from
addLiveIns()/addLiveOuts().

We need to respect pristine registers after prologue epilogue insertion,
Seeing that we got this wrong in at least two commits already, we should
rather pay the small price to query MachineFrameInfo for it.

There are three cases that did not set AddPristineAndCSRs to true even
after register allocation:
- ExecutionDepsFix: live-out registers are used as a hint that the
  register is used soon. This is not true for pristine registers so
  use the new addLiveOutsNoPristines() to maintain this behaviour.
- SystemZShortenInst: Not setting AddPristineAndCSRs to true looks like
  a bug, should do the right thing automatically now.
- StackMapLivenessAnalysis: Not adding pristine registers looks like a
  bug to me. Added a FIXME comment but maintain the current behaviour
  as a change may need to get coordinated with GC runtimes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268336 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LivePhysRegs.h
lib/CodeGen/ExecutionDepsFix.cpp
lib/CodeGen/LivePhysRegs.cpp
lib/CodeGen/StackMapLivenessAnalysis.cpp
lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
lib/Target/ARM/ARMExpandPseudoInsts.cpp
lib/Target/ARM/ARMLoadStoreOptimizer.cpp
lib/Target/ARM/Thumb1FrameLowering.cpp
lib/Target/X86/X86FixupBWInsts.cpp
lib/Target/X86/X86InstrInfo.cpp