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)
commit24f26e6d91733d90ae24c8bbc95e052928b44bff
treeb642e96287223d7ee80594f5068c3a9e866a1136
parent1a55a99362ac63b2a07d360dca07076c938a446d
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.

llvm-svn: 268336
llvm/include/llvm/CodeGen/LivePhysRegs.h
llvm/lib/CodeGen/ExecutionDepsFix.cpp
llvm/lib/CodeGen/LivePhysRegs.cpp
llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
llvm/lib/Target/X86/X86FixupBWInsts.cpp
llvm/lib/Target/X86/X86InstrInfo.cpp