This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Enable UseAA globally in the AArch64 backend
ClosedPublic

Authored by dmgreen on Mar 17 2021, 7:21 AM.

Details

Summary

This is similar to D69796 from the ARM backend. We remove the UseAA feature, enabling it globally in the AArch64 backend. This should in general be an improvement allowing the backend to reorder more instructions in scheduling and codegen, and enabling it by default helps to improve the testing of the feature, not making it cpu-specific. A debugging option is added instead for testing.

Diff Detail

Event Timeline

dmgreen created this revision.Mar 17 2021, 7:21 AM
dmgreen requested review of this revision.Mar 17 2021, 7:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2021, 7:21 AM
david-arm added inline comments.Mar 19 2021, 2:23 AM
llvm/test/CodeGen/AArch64/arm64-variadic-aapcs.ll
135

This looks like there is potentially a regression here? We've gone from a ldp to two 'ldr instructions here.

dmgreen added inline comments.Apr 10 2021, 6:16 AM
llvm/test/CodeGen/AArch64/arm64-variadic-aapcs.ll
135

There are already a lot of command lines added to this test, presumably to attempt to get it to work in the same way as it did in the past. -pre-RA-sched=linearize -enable-misched=false -disable-post-ra. Without those flags this performs the same with and without UseAA.

In general, UseAA can give more scheduling freedom and the compiler is perfectly able to shoot itself in the foot with that extra freedom. The opposite can be true too though, where it does help things, and it should help more than it hinders. And it's already enabled for certain CPU's. This just makes it global.

Matt added a subscriber: Matt.Apr 13 2021, 7:23 AM
david-arm accepted this revision.Apr 16 2021, 6:07 AM

LGTM! Thanks for explaining - I think the change looks sensible to me.

This revision is now accepted and ready to land.Apr 16 2021, 6:07 AM

Thanks. Lets see if the buildbots/everyone else agrees..

This revision was automatically updated to reflect the committed changes.