[llvm-commits] sret-demotion for large struct returns working on x86!

Duncan Sands baldrick at free.fr
Mon Nov 9 08:32:02 PST 2009


Hi Kenneth,

> +  // True if the function needs to be sret-demoted
> +  bool CantLowerReturn;

rather than using a negative, how about CanLowerReturn?

> +  /// getCantLowerReturn - Return true if the function needs sret-demotion.

The name exposes the implementation (accessing an internal variable called
CantLowerReturn) rather than the logical function.  How about negating it and
calling it "canLowerReturn".

> +  bool CanLowerReturn = TLI.CanLowerReturn(CS.getCallingConv(), 
> +                        FTy->isVarArg(), OutVTs, OutsFlags, DAG);

Isn't it confusing to have several Can/Cant's.  What's the connection between
them?

I'm not competent to comment on the rest of the patch.

Ciao,

Duncan.



More information about the llvm-commits mailing list