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

Duncan Sands baldrick at free.fr
Fri Oct 14 06:56:41 PDT 2011


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.



More information about the llvm-dev mailing list