[llvm-dev] How to generate a .ll file with functions' parameter names
David Chisnall via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 9 03:00:23 PST 2019
Hi Alberto,
Note that even with this, there isn't necessarily a 1:1 correspondence
between LLVM IR parameters and clang parameters. For example, a struct
passed by value in a C function may be one IR parameter per field, or
may be packed into an integer large enough to store the whole thing.
Similarly, return values may be indirect via sret pointers or they may
be explicit return values but of a different type (for example, on i386
a return of struct of a pair of int- or pointer-sized values may be
returned as a single i64 in LLVM IR).
It would help to understand what you are trying to do, because there may
be a better way of achieving your goal.
David
On 08/12/2019 10:19, Alberto Barbaro via llvm-dev wrote:
> Hi Tim,
> My bad, I have installed a newer version of clang and all worked.
>
> Thanks
>
> On Sun, Dec 8, 2019, 10:05 Tim Northover <t.p.northover at gmail.com
> <mailto:t.p.northover at gmail.com>> wrote:
>
> On Sun, 8 Dec 2019 at 09:54, Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> > thanks for your answer. Unfortunately I'm still using llvm 6.0
> and in llvm-dis I don't see that option. I tried reading the full
> list of options but I didn't see an alternative.
>
> The option is for Clang. Once you have the IR generated it's too late,
> the names will already have been discarded.
>
> Cheers.
>
> Tim.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
More information about the llvm-dev
mailing list