PATCH: Inliner: Don't generate memcpy calls for byval readonly parameters

Vincent Lejeune vljn at ovi.com
Wed Oct 23 05:52:26 PDT 2013


Thank for adding some test to my patch !
However is it possible to change the name of the HandleByValArgument ?
I used ArgAsArgument but actually Arg and ArgAsArgument represent 2 different things,
Arg is the value passed to the function call, while ArgAsArgument is indeed the argument
in the called signature. I think renaming Arg to "PassedValue" and ArgAsValue to
"ArgumentSignature" would make the description of both parameters more self
explanatory.

Vincent


-static Value *HandleByValArgument(Value *Arg, Instruction *TheCall,
+static Value *HandleByValArgument(Value *Arg,
+                                  const Argument *ArgAsArgument,
+                                  Instruction *TheCall,







>________________________________
> De : Nick Lewycky <nlewycky at google.com>
>À : Chandler Carruth <chandlerc at google.com> 
>Cc : Tom Stellard <tom at stellard.net>; Commit Messages and Patches for LLVM <llvm-commits at cs.uiuc.edu>; vljn at ovi.com 
>Envoyé le : Mercredi 23 octobre 2013 0h20
>Objet : Re: PATCH: Inliner: Don't generate memcpy calls for byval readonly parameters
> 
>
>
>On 22 October 2013 15:11, Chandler Carruth <chandlerc at google.com> wrote:
>
>This looks fine, but Nick should confirm that it is the correct implementation of byval & readonly.
>
>
>I don't deeply understand 'byval', but this patch looks like it can't possibly be wrong.
>
>
>On Tue, Oct 22, 2013 at 3:07 PM, Tom Stellard <tom at stellard.net> wrote:
>>
>>Hi,
>>>
>>>The function inliner avoids generating memcpy calls when the parameter
>>>is marked byval and the function is marked readonly.  The attached
>>>patch extends this behavior to the case where the function parameter is
>>>readonly, but the function isn't.
>>>
>>>Please review.
>>>
>>>Thanks,
>>>Tom
>>>
>>
>
>
>
>




More information about the llvm-commits mailing list