This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Enhance the load/store optimizer to use target-specific alias analysis.
ClosedPublic

Authored by mcrosier on May 19 2015, 2:20 PM.

Details

Summary

All,
This patch enhance the AArch64LoadStoreOptimizer to use target-specific alias analysis information to increase the number of ldp/stp instruction generated.

Correctness testing included EEMBC, Spec2000, Spec2006 on cortex-a57. All look good!

For the particular benchmark I was investigating (spec2006/milc) the number of ldp/stp instructions strictly increased. I should have performance numbers shortly, but wanted to post the patch for review in the mean time.

Lastly, assuming this patch is accepted, I'd like to investigate using the actual Alias Analysis pass. Should I be concerned with compile-time or any other factor?

Please have a look.

Chad

Diff Detail

Event Timeline

mcrosier updated this revision to Diff 26091.May 19 2015, 2:20 PM
mcrosier retitled this revision from to [AArch64] Enhance the load/store optimizer to use target-specific alias analysis..
mcrosier updated this object.
mcrosier edited the test plan for this revision. (Show Details)
mcrosier added reviewers: t.p.northover, grosbach, aadg.
mcrosier added a subscriber: Unknown Object (MLST).
mcrosier updated this revision to Diff 26252.May 21 2015, 10:26 AM

Minor revisions.

  1. Check mayAlias on FirstMI if we're merging forward.
  2. Check mayAlias on MI if we're not merging forward.

The previous patch would stop looking for a pair if we encountered an instruction that aliased with FirstMI. This isn't a problem, however, if we're merging the second instruction into the first.

Correctness still looks good across the board.

Performance looks flat on cortex-a57. The number of ldp/stp generated increased across the board for all things I tested.

jmolloy edited edge metadata.May 21 2015, 10:46 AM

Hi Chad,

This looks OK to me; I think perhaps it might be a good idea to add a helper function to MachineInst "mayLoadOrStore" or something, to remove a lot of the repeated "mayLoad() || mayStore()" throughout the patch.

Cheers,

James

jmolloy accepted this revision.Jul 17 2015, 2:20 AM
jmolloy edited edge metadata.

[Phab spring clean] - This got accepted.

This revision is now accepted and ready to land.Jul 17 2015, 2:20 AM
mcrosier closed this revision.Jul 21 2015, 2:49 PM