Liad Mordekoviz via llvm-dev
2018-Aug-08 13:42 UTC
[llvm-dev] Passing arguments to var args function
Hey Tim, thanks for the quick answer, this looks exactly like what I was trying to achieve, I was hoping there was something more clean, I was wondering how the community would accept a change in the TD, if the code at CallinvConvLower.cpp:138 would've passed the IsFixed flag to the AssignFn then all those workarounds wouldn't be needed, this example is only one of a few I can think of for expanding the CallingConvention tablegen capabilities regarding this issue. Thanks for the answer. On Wed, Aug 8, 2018 at 4:21 PM, Tim Northover <t.p.northover at gmail.com> wrote:> Hi Liad, > > On Wed, 8 Aug 2018 at 13:28, Liad Mordekoviz via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Did anyone else come by such requirement? is there any other way anyone > could recommend handling such requirement? > > Apple's calling convention on iOS does this. We have two separate > CC_Whatever definitions and then AArch64ISelLowering.cpp chooses which > one to use based on whether the argument is fixed or not (see line > 3446 onwards). > > Cheers. > > Tim. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180808/11c30251/attachment.html>
Tim Northover via llvm-dev
2018-Aug-08 13:49 UTC
[llvm-dev] Passing arguments to var args function
On Wed, 8 Aug 2018 at 14:42, Liad Mordekoviz <liad.mordekoviz at nextsilicon.com> wrote:> I was wondering how the community would accept a change in the TD, > if the code at CallinvConvLower.cpp:138 would've passed the IsFixed flag to the AssignFn then all those workarounds wouldn't be needed,I think that would be a pretty good idea. I suspect the main reason it wasn't done for AArch64 is that the backend was secret at the time and Jim wanted to minimize merge conflicts. Cheers. Tim.
Alex Bradbury via llvm-dev
2018-Aug-08 14:59 UTC
[llvm-dev] Passing arguments to var args function
On 8 August 2018 at 14:49, Tim Northover via llvm-dev <llvm-dev at lists.llvm.org> wrote:> On Wed, 8 Aug 2018 at 14:42, Liad Mordekoviz > <liad.mordekoviz at nextsilicon.com> wrote: >> I was wondering how the community would accept a change in the TD, >> if the code at CallinvConvLower.cpp:138 would've passed the IsFixed flag to the AssignFn then all those workarounds wouldn't be needed, > > I think that would be a pretty good idea. I suspect the main reason it > wasn't done for AArch64 is that the backend was secret at the time and > Jim wanted to minimize merge conflicts.Anyone looking at this issue may want to take a look at my patch here https://reviews.llvm.org/D42374 which adds an IsFixed field to ISD::ArgFlagsTy. Best, Alex