On Sat, Apr 09, 2011 at 12:21:46PM +0930, Alan Modra wrote: > a) Allow sibling calls via function pointer. At the time > rs6000_function_ok_for_sibcall was written, I don't think access to > arg types of function pointer calls was available in the target > hook/macro. > > + /* Functions with vector parameters are required to have a > + prototype, so the argument type info must be available > + here. */ > + for (type = TYPE_ARG_TYPES (fntype); > + type; > + type = TREE_CHAIN (type)) > + if (TREE_CODE (TREE_VALUE (type)) == VECTOR_TYPE > + && (ALTIVEC_VECTOR_MODE (TYPE_MODE (TREE_VALUE (type))) > + || VSX_VECTOR_MODE (TYPE_MODE (TREE_VALUE (type))))) > + nvreg++; > + > + for (type = TYPE_ARG_TYPES (TREE_TYPE (current_function_decl)); > + type; > + type = TREE_CHAIN (type)) > + if (TREE_CODE (TREE_VALUE (type)) == VECTOR_TYPE > + && (ALTIVEC_VECTOR_MODE (TYPE_MODE (TREE_VALUE (type))) > + || VSX_VECTOR_MODE (TYPE_MODE (TREE_VALUE (type))))) > + nvreg--;
Could I request that you use FOREACH_FUNCTION_ARGS in these two cases? The conversion is trivial, and avoiding more exposed TYPE_ARG_TYPES calls is a good thing. Thanks, -Nathan