[cfe-commits] [QUESTION] vecreturn attribute question 2

John Thompson john.thompson.jtsoftware at gmail.com
Tue Aug 10 13:18:49 PDT 2010


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.

Are there any code generation patterns already in Clang where a structure is
stored in one or more registers that I could look at?  I.e. where "this",
instead of being a pointer is one or more registers?

The fact that vector registers in AltiVec on the PowerPC are so orthogonal
to the other registers (i.e. I don't think there are any instructions for
transfering directly between vector registers and the general registers) I'm
sure makes it even more complicated.
Do you think this would be beyond me as a Clang code generation novice?

Would this require any changes to the LLVM back-end, or could it all be
expressed in the present LLVM IR?

-John

-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100810/2f16edfe/attachment.html>


More information about the cfe-commits mailing list