This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Improve adrp schedule modelling on the Cortex-A55
ClosedPublic

Authored by NickGuy on Sep 6 2021, 6:50 AM.

Details

Summary

Enables the FuseAddress feature in the Cortex-A55 scheduling model

Diff Detail

Event Timeline

NickGuy created this revision.Sep 6 2021, 6:50 AM
NickGuy requested review of this revision.Sep 6 2021, 6:50 AM
dmgreen added inline comments.Sep 6 2021, 7:49 AM
llvm/lib/Target/AArch64/AArch64InstrFormats.td
3215 ↗(On Diff #370910)

This seems like a separate feature from adding FeatureFuseAddress for A55.

ReadAdrBase seems to be for the "base resister of a reg-offset LD/ST", where as this is the base register of a imm-offset LD/ST.
Having a Read for this would sound useful, but it would probably be best for it to be on all Imm offset base registers, not just this one, and sounds like a separate change.

NickGuy updated this revision to Diff 370928.Sep 6 2021, 8:23 AM
NickGuy edited the summary of this revision. (Show Details)
NickGuy added inline comments.
llvm/lib/Target/AArch64/AArch64InstrFormats.td
3215 ↗(On Diff #370910)

I've pulled it out of this change, and I'll push it up for review separately.

OK. Can you add a test? Something that would schedule instructions apart before and keep them together now.

NickGuy updated this revision to Diff 371345.Sep 8 2021, 8:24 AM

OK. Can you add a test? Something that would schedule instructions apart before and keep them together now.

Done, I've pre-committed the test locally so the actual change is easier to see.

dmgreen added inline comments.Sep 10 2021, 1:07 AM
llvm/test/CodeGen/AArch64/a55-fuse-address.mir
2

Should this be running a pass? -run-pass=machine-scheduler? And be updated using update_mir_test_checks?

NickGuy updated this revision to Diff 371823.Sep 10 2021, 1:36 AM

Updated test

llvm/test/CodeGen/AArch64/a55-fuse-address.mir
2

Done. I feel like there was a reason why I didn't in the first place (i.e. it wasn't working for whatever reason), but it works now so ¯\_(ツ)_/¯

dmgreen accepted this revision.Sep 10 2021, 6:21 AM

Thanks. The Cortex-A55 software optimization guide does mention "dedicated forwarding paths" for this case. LGTM

This revision is now accepted and ready to land.Sep 10 2021, 6:21 AM
This revision was landed with ongoing or failed builds.Sep 21 2021, 5:04 AM
This revision was automatically updated to reflect the committed changes.
Matt added a subscriber: Matt.Sep 28 2021, 12:36 PM