https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304

--- Comment #34 from Evandro <e.menezes at samsung dot com> ---
(In reply to Wilco from comment #33)
> (In reply to Evandro from comment #32)
> ADRP latency to load-address should be zero on any OoO core - ADRP is
> basically a move-immediate, so can execute early and hide any latency.

In an ideal world, yes.  In the actual world, they compete for limited
resources that could be used by other insns.

> > Which brings another point, shouldn't there be just one ADRP per BB or,
> > ideally, per function?  Or am I missing something?
> 
> That's not possible in this case as the section is mergeable. An alternative
> implementation using anchors may be feasible, but GCC is extremely bad at
> using anchors efficiently - functions using several global variables also
> end up with a large number of ADRPs when you'd expect a single ADRP.

I see.  

I'll investigate placing the constant after the function, as before, if the
estimated function size allows for it.  I think that eliminating the ADRPs
could potentially be more beneficial to code size than merging constants in a
common literal pool (v. http://bit.ly/1Ptc8nh).

Thank you.

Reply via email to