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

Stephen Lin swlin at post.harvard.edu
Wed May 1 07:59:17 PDT 2013


FYI, I posted a front-end patch to take advantage of this attribute at:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130429/078911.html

Please let me know if you have any suggestions or comments.

On Wed, Apr 24, 2013 at 9:08 PM, Stephen Lin <swlin at post.harvard.edu> wrote:
> 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