[llvm] r225909 - Revert "r225811 - Revert "r225808 - [PowerPC] Add StackMap/PatchPoint support""

Bill Schmidt wschmidt at linux.vnet.ibm.com
Fri Jan 16 06:35:49 PST 2015


On Thu, 2015-01-15 at 22:54 -0600, Hal Finkel wrote:
> ----- Original Message -----
> > From: "Hal Finkel" <hfinkel at anl.gov>
> > To: "Bill Schmidt" <wschmidt at linux.vnet.ibm.com>
> > Cc: llvm-commits at cs.uiuc.edu
> > Sent: Thursday, January 15, 2015 10:42:57 PM
> > Subject: Re: [llvm] r225909 - Revert "r225811 - Revert "r225808 - [PowerPC]	Add StackMap/PatchPoint support""
> > 
> > ----- Original Message -----
> > > From: "Hal Finkel" <hfinkel at anl.gov>
> > > To: "Bill Schmidt" <wschmidt at linux.vnet.ibm.com>
> > > Cc: llvm-commits at cs.uiuc.edu
> > > Sent: Thursday, January 15, 2015 11:42:36 AM
> > > Subject: Re: [llvm] r225909 - Revert "r225811 - Revert "r225808 -
> > > [PowerPC]	Add StackMap/PatchPoint support""
> > > 
> > > ----- Original Message -----
> > > > From: "Bill Schmidt" <wschmidt at linux.vnet.ibm.com>
> > > > To: "Hal Finkel" <hfinkel at anl.gov>
> > > > Cc: llvm-commits at cs.uiuc.edu
> > > > Sent: Thursday, January 15, 2015 9:46:05 AM
> > > > Subject: Re: [llvm] r225909 - Revert "r225811 - Revert "r225808 -
> > > > [PowerPC] Add StackMap/PatchPoint support""
> > > > 
> > > > Hi Hal,
> > > > 
> > > > A couple of comments below:
> > > 
> > > Thanks!
> > > 
> > > > 
> > > > On Wed, 2015-01-14 at 01:07 +0000, Hal Finkel wrote:
> > > > 
> ...
> > > > > 
> > > > > +const MCPhysReg *
> > > > > +PPCTargetLowering::getScratchRegisters(CallingConv::ID) const
> > > > > {
> > > > > +  // LR is a callee-save register, but we must treat it as
> > > > > clobbered by any call
> > > > > +  // site. Hence we include LR in the scratch registers, which
> > > > > are
> > > > > in turn added
> > > > > +  // as implicit-defs for stackmaps and patchpoints. The same
> > > > > reasoning applies
> > > > > +  // to CTR, which is used by any indirect call.
> > > > > +  static const MCPhysReg ScratchRegs[] = {
> > > > > +    PPC::X11, PPC::X12, PPC::LR8, PPC::CTR8, 0
> > > > > +  };
> > > > > +
> > > > > +  return ScratchRegs;
> > > > > +}
> > > > 
> > > > It isn't safe to assume PPC::X11 is clobbered at an indirect call
> > > > site
> > > > under the ELFv2 ABI.  The rest of these are ok for both ABIs.
> > > 
> > > Okay, thanks. I'll update it.
> > 
> > r226247.
> 
> Bill, now I'm somewhat confused. Looking at the ELF V2 spec, R11 is still listed as a volatile register used as an "environment pointer", and so still seems to be available as a scratch register in this sense. Has there really been an ELF V1 -> ELF V2 change w.r.t. R11?

Hal, I'm sorry.  You can go ahead and use X11 here for ELFv2 as well.
There had been a proposal to kill the environment pointer but ultimately
that was not adopted.  X11 may also be used in intermodule glue code.
Sorry for the noise. :/

Bill

> 
>  -Hal
> 
> > 
> >  -Hal
> > 
> > > 
> > >  -Hal
> > > 
> > > > 
> > > > > +
> > > > >  bool
> > > > >  PPCTargetLowering::shouldExpandBuildVectorWithShuffles(
> > > > >                       EVT VT , unsigned DefinedValues) const {
> > > > > 
> > > > 
> > > > 
> > > > 
> > > 
> > > --
> > > Hal Finkel
> > > Assistant Computational Scientist
> > > Leadership Computing Facility
> > > Argonne National Laboratory
> > > _______________________________________________
> > > llvm-commits mailing list
> > > llvm-commits at cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > > 
> > 
> > --
> > Hal Finkel
> > Assistant Computational Scientist
> > Leadership Computing Facility
> > Argonne National Laboratory
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > 
> 





More information about the llvm-commits mailing list