Page MenuHomePhabricator

AArch64: Complete macroop fusion lists.
ClosedPublic

Authored by MatzeB on Sep 30 2016, 4:47 PM.

Details

Summary

AArch64InstrInfo::shouldScheduleAdjacent() determines whether two instruction can benefit from macroop fusion.
Until recently macrofusion was only enabled for Apple CPUs and this list was designed for that. As it turned out it was not complete and needed more entries, which this patch fixes.

However by now the macrofusion code appears to be used by Vulcan CPU as well. Pankaj: Can you comment whether those changes are good for vulcan as well or whether we have to find a way to split this into vulcan and apple specific code?

This is an early patch to get review comments, testcase adjustments still pending.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 73164.Sep 30 2016, 4:47 PM
MatzeB retitled this revision from to AArch64: Complete macroop fusion lists..
MatzeB updated this object.
MatzeB added reviewers: pgode, t.p.northover.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
pgode edited edge metadata.Oct 2 2016, 10:53 AM

Thanks for asking.
The first part of changes i.e. 'Fuse CMN, CMP, TST followed by Bcc', is applicable for Vulcan as well.
But, the second part i.e. 'Fuse ALU operations followed by CBZ/CBNZ' is not applicable for Vulcan, i.e. we don't fuse these. Is it possible to make this only Apple specific ?

MatzeB added a comment.Oct 3 2016, 1:27 PM

Thanks for asking.
The first part of changes i.e. 'Fuse CMN, CMP, TST followed by Bcc', is applicable for Vulcan as well.
But, the second part i.e. 'Fuse ALU operations followed by CBZ/CBNZ' is not applicable for Vulcan, i.e. we don't fuse these. Is it possible to make this only Apple specific ?

That part was even there before the patch. Anyway I'll update the patch by splitting the target feature into two.

MatzeB updated this revision to Diff 73331.Oct 3 2016, 1:28 PM
MatzeB edited edge metadata.

Split macrofusion target feature into two so we can model the apple/vulcan differences.

pgode accepted this revision.Oct 3 2016, 10:23 PM
pgode edited edge metadata.

Thanks for splitting the code. LGTM.
Thanks.

This revision is now accepted and ready to land.Oct 3 2016, 10:23 PM
This revision was automatically updated to reflect the committed changes.