[llvm] r185024 - ARM: Proactively ensure that the LowerCallResult hack for 'this'-returns is not used for incompatible calling conventions.

Eric Christopher echristo at gmail.com
Wed Jun 26 15:02:42 PDT 2013


Hi Stephen,

Couple of nits (I'm staying out of the longer thread :)

>  ARMBaseRegisterInfo::getThisReturnPreservedMask(CallingConv::ID) const {
>    return (STI.isTargetIOS() && !STI.isAAPCS_ABI())
>      ? CSR_iOS_ThisReturn_RegMask : CSR_AAPCS_ThisReturn_RegMask;
> +  // This should return NULL in the case of any calling convention that does
> +  // not use the same register for an i32 first argument and an i32 return
> +  // value

Is it actually returning NULL in these cases or should it? Also the
comment looks weird underneath the line :)


> +  // getThisReturnPreservedMask - Returns a call preserved mask specific to the
> +  // case that 'returned' is  an i32 first argument if the calling convention
> +  // is one that can (partially) model this attribute with a preserved mask
> +  // (i.e. it is a calling convention that uses the same register for the first
> +  // i32 argument and an i32 return value)
> +  //
> +  // Should return NULL in the case that the calling convention does not have
> +  // this property
> +  const uint32_t *getThisReturnPreservedMask(CallingConv::ID) const;
> +

Doxygen style comments would be good here matching the ones above.

-eric



More information about the llvm-commits mailing list