[PATCH] D20376: Properly set CLI.NumFixedArgs for mem{set, move, cpy} builtins in SelectionDAG
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 12:15:15 PDT 2016
On 6/9/2016 2:02 PM, Justin Bogner wrote:
> Krzysztof Parzyszek via llvm-commits <llvm-commits at lists.llvm.org>
> writes:
>>
>> The NumFixedArgs will be set by the CLI::setCallee function, do not
>> force it to be 0 for these builtins.
>
> What is the actual effect of this change? There are a lot of other
> places that call setCallee in the same way, so shouldn't we update all
> of them too?
You are right---all of them should be updated.
Setting the number of fixed arguments to something different from the
size of Args never makes sense, except for vararg functions. For
non-vararg function we shouldn't pass this argument at all.
> In fact, I'm not really convinced that we need to pass this argument
> here at all - When don't we want Args.size()?
That's pretty much what this patch does, but seemingly in an
insufficient number of places.
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-commits
mailing list