On Tue, Aug 10, 2010 at 1:18 PM, John Thompson <[email protected]> wrote: > With respect to the vecreturn attribute, do you have any suggestions on how > to implement the code generation part? > > The only approach I can think of changes both the function definition and > function calling code, and actually any other code using the record, to > treat it as if it were in a vector register if it sees the attribute > attached to the structure definition. However, this seems like a major > change.
It's definitely non-trivial, but fortunately for you, we already have code which handles this sort of thing in lib/CodeGen/TargetInfo.cpp. For example, when generating code for x86-64, clang actually does precisely the transformation in question for structs containing only a single vector. Making the vecreturn attribute work should just be a matter of adding an appropriate check to the relevant version of classifyReturnType. -El _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
