[LLVMdev] Request for merge: GHC/ARM calling convention.

Duncan Sands
2011-10-14T13:56:41Z

Hi Karel,

>  > const unsigned*
>  > ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
const {
>  > + bool ghcCall = false;
>  > +
>  > + if (MF) {
>  > + const Function *F = MF->getFunction();
>  > + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false);
>  > + }
>
>  > This bit looks dubious. Why do you need to do it?
>
> What exactly? We need to test if this is GHC calling convention or not and
if
> its, then return different set of callee saved regs. What exactly don't
you like
> on this piece?

I don't see anyone else rummaging around inside the original function for
the
calling convention, so why do you need to?  If this information is useful to
have, why isn't it in the machine function?

Ciao, Duncan.