[llvm-commits] [PATCH] To enable struct byval for ARM
Manman Ren
mren at apple.com
Wed May 30 10:57:54 PDT 2012
Hi Tim,
For memcpy, the default is to call the library function, and we don't want to expand it to a loop.
For struct byval, there were problems calling into the library function.
We can't expand 'struct byval' to a loop at SelectionDAG since SelectionDAG is supposedly not aware of control flow.
Correct me if I am wrong, I am kind of new to this too :)
Thanks,
Manman
On May 30, 2012, at 10:22 AM, Tim Northover wrote:
> Hi Manman,
>
>> This patch is to enable struct byval for ARM.
>> It inserts a pseudo op for each struct byval argument and the pseudo ops will be expanded to a loop or unrolled scalar copies.
>
> Is there any particular reason you're not using SelectionDAG's
> getMemcpy function? It looks like EmitTargetCodeForMemCpy is a little
> naive on ARM at the moment (it seems to generate no loops), but that
> seems like a more natural place to put the bulk of your code when it
> really is the best way to expand the copy.
>
> I may be missing something fundamental, of course.
>
> Tim.
More information about the llvm-commits
mailing list