[PATCH] Allow CodeGen to take advantage of functions that always return arguments

Stephen Lin swlin at post.harvard.edu
Wed Apr 24 18:08:37 PDT 2013


That's a good idea, I can look into that; after a bit of delay I'm
about to get started on the patch to add this to 'this''-returning
constructors/destructors (i.e. ARM and MS C++ ABIs) so I will keep
those in mind as well.

Stephen

On Wed, Apr 24, 2013 at 8:51 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Apr 19, 2013, at 10:21 PM, Stephen Lin <swlin at post.harvard.edu> wrote:
>
>>>
>>> Thanks.
>>>
>>> Stephen,
>>>
>>> The patch didn't apply cleanly. Someone has updated lib/CodeGen/Analysis.cpp. Could you regen your patch? I'll apply it once you send it. :)
>>>
>>> -bw
>>>
>>
>> Committed as r179925, with additional test for ms-cxx-abi on x86_64
>> 'this'-returns.
>>
>> Clang patch forthcoming (should be relatively trivial).
>
> Cool.  Have you considered having clang add this attribute for memcpy/memset/strcat and other well known library functions?
>
> -Chris



More information about the llvm-commits mailing list