Page MenuHomePhabricator

[AArch64][GlobalISel] Create a new minimal combiner pass just for -O0.

Authored by aemerson on May 6 2021, 5:52 PM.



We never bothered to have a separate set of combines for -O0 in the prelegalizer before. This results in some minor performance hits for a mode where performance isn't a concern (although not regressing code size significantly is still preferable).

Through experiments, I've arrived at a set of combines that gets the most code size improvement at -O0, while reducing the amount of time spent in the combiner by around 25% give or take.

Diff Detail

Event Timeline

aemerson created this revision.May 6 2021, 5:52 PM
aemerson requested review of this revision.May 6 2021, 5:52 PM
aemerson updated this revision to Diff 343726.May 7 2021, 11:33 AM

Remove CSE from the combiner, this saves an additional 10% of the runtime in the pass, with no effect on code size.

paquette added inline comments.May 7 2021, 11:46 AM

At some point we should probably document the combiner groups.


missing newline


This is still in the normal pre-legalizer combiner right?

Maybe we should factor the shared functions out into a separate file.


Maybe there should be a non-O0 checkline here too?

aemerson added inline comments.May 7 2021, 4:20 PM

This is a stupid test that shouldn't exist for -O0. I'm going to delete it.

aemerson updated this revision to Diff 343781.May 7 2021, 4:22 PM

Address comments. Factor out tryEmitBZero into the utils file.

Delete test that should never have been written.

aemerson updated this revision to Diff 343783.May 7 2021, 4:40 PM
paquette accepted this revision.May 7 2021, 4:59 PM


This revision is now accepted and ready to land.May 7 2021, 4:59 PM
paquette added inline comments.May 7 2021, 5:00 PM

missing newline

This revision was landed with ongoing or failed builds.May 7 2021, 5:07 PM
This revision was automatically updated to reflect the committed changes.