[llvm-commits] [llvm] r80002 - in /llvm/trunk: lib/CodeGen/PostRASchedulerList.cpp test/CodeGen/ARM/2009-08-21-PostRAKill.ll test/CodeGen/ARM/2009-08-21-PostRAKill2.ll test/CodeGen/ARM/2009-08-21-PostRAKill3.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Aug 25 11:00:38 PDT 2009
On 25/08/2009, at 19.03, David Goodwin wrote:
> + if (!GenerateLivenessForKills) {
> + // Consider callee-saved registers as live-out, since we're
> running after
> + // prologue/epilogue insertion so there's no way to add
> additional
> + // saved registers.
> + //
> + // TODO: If the callee saves and restores these, then we can
> potentially
> + // use them between the save and the restore. To do that, we
> could scan
> + // the exit blocks to see which of these registers are defined.
> + // Alternatively, callee-saved registers that aren't saved and
> restored
> + // could be marked live-in in every block.
> + for (const unsigned *I = TRI->getCalleeSavedRegs(); *I; ++I) {
Note that there is a new method
MachineFrameInfo::getPristineRegs(MBB). It gives you a list of CSRs
that have not been saved when entering the MBB. The remaining CSRs
have been saved and can be treated like call clobbered registers.
Marking pristine regs as live-in should take care of your TODO. That
is how the register scavenger does it.
/jakob
More information about the llvm-commits
mailing list