Could a gatekeeper review the attached patch? It fixes some AMD64 ABI compatibility problems and also eliminates some unnecessary struct copies. The second part should apply to all targets.
Here is the proposed log message: Improve AMD64 ABI compliance and avoid unnecessary struct copies. For the following code, the compiler generated unnecessary struct copies for a return value that has a size too big to be passed in registers. typedef struct { char big[1024]; } C; C gc; extern C bar9 (void); extern C check9 (void) { return bar9 (); } In this case there were two copies and one temporary variable generated. After this change the compiler does not generate any extra copies. According to the AMD64 ABI, the caller provides space for the return value in a hidden first argument and this address is returned in %rax. Previously the compiler was not following this rule. The change handles the similar cases of initialization by function call ("C c = bar9();") and assignment to a pointer ("*cp = bar9()"). Also, a complex long double field is now returned in the register pair (%st0, %st1) as specified by the AMD64 ABI. I am still looking for a review for the patch I posted last week (May 10) as well. Thanks, -David Coakley / AMD Open Source Compiler Engineering ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel