[llvm-commits] [llvm-gcc-4.2] r49017 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp config/rs6000/llvm-rs6000.cpp config/rs6000/rs6000.h llvm-abi.h

Duncan Sands baldrick at free.fr
Tue Apr 1 02:18:24 PDT 2008


Hi Devang,

> +/* Returns true if TYPE should be pass as scalar. */

should be pass -> should be passed

> +/* Returns true if TYPE should be pass as scalar. */

Likewise.

> +// isAggregateFunctionParam - Return true if the specified GCC type 
> +// satisfies function.c:aggregate_value_p()
> +static bool isAggregateFunctionParam(tree type) {
> +  if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST
> +      && !aggregate_value_p(type, current_function_decl))

Use of current_function_decl is bogus because the ABI logic is also
used when calling a function, in which case it is the declaration of
the callee that you need here!  I understand that this is not your
fault: the bug was already present in the original code.  But since you
seem to be working on this stuff, maybe you could fix this while there.

Thanks,

Duncan.



More information about the llvm-commits mailing list