[llvm-dev] [RFC][LLVM] New Constant type for representing function PLT entries

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 21 08:49:25 PDT 2020

On 8/21/20 10:39 AM, Renato Golin wrote:
> On Fri, 21 Aug 2020 at 16:20, Hal Finkel <hfinkel at anl.gov 
> <mailto:hfinkel at anl.gov>> wrote:
>     FWIW, I think that we all agree to that. I don't see that what's
>     being proposed changes this general philosophy. The general
>     problem is: what happens when that lowering has multiple good
>     options, and the ABI requires particular choices under certain
>     circumstances?
> If this is decided from the front-end and needs to survive all the way 
> to the back-end, why not just add a generic function attribute?

But it's not a property of the functions, as I understand it, it's a 
function of place where the function is referenced. In this case, maybe 
we could consider it a property of the vtable itself, and some attribute 
on the array/global would work?

> Perhaps I'm interpreting this the wrong way, but adding a special 
> (independent) entry to the IR that hints at an ABI correctness seems 
> fragile to me.

This is a first-class IR entity. It seems the opposite of fragile. The 
interesting question is going to be: do we have a wile bunch of other 
code that generally handles constant expressions that needs to learn 
about this new kind of function reference?


> --reanto
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200821/4dd2df63/attachment.html>

More information about the llvm-dev mailing list