This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Enable FeatureFuseAdrpAdd for all cpus
ClosedPublic

Authored by dmgreen on Sep 23 2022, 12:52 AM.

Details

Summary

The commit D120104 enabled FeatureFuseAdrpAdd for -mcpu=generic, allowing the linker to relax adrp;add pairs where possible. D132075 extended that to neoverse-n1, this patch extends it to all other cortex and neoverse cpus for the same reason.

Diff Detail

Event Timeline

dmgreen created this revision.Sep 23 2022, 12:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 12:52 AM
dmgreen requested review of this revision.Sep 23 2022, 12:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 12:52 AM
dmgreen updated this revision to Diff 462408.Sep 23 2022, 12:54 AM
fhahn added a subscriber: fhahn.Sep 23 2022, 1:40 AM

Should the title say *to all Cortex & Neoverse CPUs* instead of *all CPUs*? It looks like TuneThunderX2T99 for example doesn't have the feature unless I am missing something,

peter.smith accepted this revision.Sep 23 2022, 1:45 AM

LGTM. I think all CPUs can benefit from the linker relaxation of the fused sequence. Worth leaving some time for any other reviewer to object.

This revision is now accepted and ready to land.Sep 23 2022, 1:45 AM

Thanks

Should the title say *to all Cortex & Neoverse CPUs* instead of *all CPUs*? It looks like TuneThunderX2T99 for example doesn't have the feature unless I am missing something,

Oh yeah, I meant for all the Arm cpus.

LGTM. I think all CPUs can benefit from the linker relaxation of the fused sequence. Worth leaving some time for any other reviewer to object.

Thanks. To add some detail I did a fair amount of benchmarking, which all looked fine for the cpus I tried. Even on a Cortex-A55 (an in-order cpu where scheduling is most useful), on a linker without relaxation for the adrp-add pair the performance seems OK. So I believe this is benign at worst, showing an improvement where the relaxation can occur.

This revision was automatically updated to reflect the committed changes.