[PATCH] MachineFrameInfo: Simplify pristine register calculation.

Matthias Braun matze at braunis.de
Thu May 28 12:47:58 PDT 2015


Hi qcolombet,

About pristine regsiters:
Pristine registers "hold a value that is useless to the current
function, but that must be preserved - they are callee saved registers
that have not been saved." This concept saves compile time as it frees
the prologue/epilogue inserter from adding every such register to every
basic blocks live-in list.

However the current code in getPristineRegs is formulated in a
complicated way: Inside the function prologue and epilogue all callee
saves are considered pristine, while in the rest of the code only the
non-saved ones are considered pristine.  This requires logic to
differentiate between prologue/epilogue and the rest and in the presence
of shrink-wrapping this even becomes complicated/expensive.  It's also
unnecessary because the prologue epilogue inserters already mark
callee-save registers that are saved/restores properly in the respective
blocks in the prologue/epilogue (see updateLiveness() in
PrologueEpilogueInserter.cpp). So only declaring non-saved/restored
callee saved registers as pristine just works.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10101

Files:
  include/llvm/CodeGen/MachineFrameInfo.h
  lib/CodeGen/AggressiveAntiDepBreaker.cpp
  lib/CodeGen/CriticalAntiDepBreaker.cpp
  lib/CodeGen/MachineFunction.cpp
  lib/CodeGen/MachineVerifier.cpp
  lib/CodeGen/RegisterScavenging.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10101.26725.patch
Type: text/x-patch
Size: 7295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150528/5426f7e0/attachment.bin>


More information about the llvm-commits mailing list