[PATCH] D15525: [GCC] Attribute ifunc support in llvm

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 07:47:41 PST 2015


On Fri, Dec 18, 2015 at 05:50:38PM +0300, Dmitry Polukhin wrote:
> On Fri, Dec 18, 2015 at 5:39 PM, Joerg Sonnenberger via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> 
> > On Fri, Dec 18, 2015 at 09:17:17AM +0000, Dmitry Polukhin via llvm-commits
> > wrote:
> > > Just for the sake of completeness, there is a way to avoid IR extension
> > > - it is possible to emit global asm statement like
> > >    `__asm__ (".type resolver_alias_name, @gnu_indirect_function")`
> > > and avoid IR extension but I didn't seriously consider this path.
> >
> > Why not? Let me put it another way: what is the advantage of making the
> > intermediate layers aware of ifuncs? Can they provide better
> > optimisations? Can they diagnose any potential bugs?
> >
> 
> I think it is kind of hack and LLVM will have to know about ifunc in some
> way to avoid optimizing such aliases (i.e. using resolver instead of ifunc
> that it wrong). It is like using alias as ifunc but even not even mark it
> as ifunc until target assembler :) But anyway it seems that it worth
> mention so I'll put it into RFC as an option.

But it can't know what function is called?

Joerg


More information about the llvm-commits mailing list