[llvm] [llvm][aarch64] Apple A16 & A17 had adrp-add fusion, but A14 did not (PR #81325)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 11 12:00:36 PST 2024
davemgreen wrote:
> I was assuming Apple `ld`/`ld-prime`, and only thinking about the effect of this on instruction scheduling / macro-fusion + knowledge of the respective uarch's.
>
> Can you tell me more about how that linker relaxation works? Is it an optimization that keys off of `FeatureAdrpAdd` itself, or is it merely enabled by placing the `adrp` next to the `add`?
As far as I understand inside the linker it is done via adjacent instructions. It doesn't have much other information, other than the relocations. I think so long as the linker used will most likely be apple ld using LoH's, then it's fine to be more accurate with the fusion and not "mis-use" the feature to get adjacent instructions.
> > > Changes like this should ideally be accompanied by a test.
> >
> >
> > I'll add one.
>
> [ffab5a0](https://github.com/llvm/llvm-project/commit/ffab5a089b1e94b3305fbdfdf1547b751121c090)
Thanks!
https://github.com/llvm/llvm-project/pull/81325
More information about the llvm-commits
mailing list