This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Don't run the block placement pass at O0
ClosedPublic

Authored by samtebbs on Jan 14 2021, 7:52 AM.

Details

Summary

The block placement pass shouldn't run unless optimisations are enabled.

Diff Detail

Event Timeline

samtebbs created this revision.Jan 14 2021, 7:52 AM
samtebbs requested review of this revision.Jan 14 2021, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2021, 7:52 AM
SjoerdMeijer accepted this revision.Jan 14 2021, 7:58 AM

Yep, don't think it is useful or necessary to run this at O0.
LGTM.

llvm/lib/Target/ARM/ARMTargetMachine.cpp
555–556

Nit: perhaps merge this with if below, and say something like:

// Don't optimize barriers and block placement at -O0.
This revision is now accepted and ready to land.Jan 14 2021, 7:58 AM
samtebbs updated this revision to Diff 316671.Jan 14 2021, 8:28 AM

Merge with if statement below

Yep, don't think it is useful or necessary to run this at O0.
LGTM.

Thanks Sjoerd. I have merged it with the section below.

Should the pass itself call skipFunction in its runOnMachineFunction method? That's what handles skipping for optnone function and optbisect.

This revision was landed with ongoing or failed builds.Jan 15 2021, 6:00 AM
This revision was automatically updated to reflect the committed changes.

Should the pass itself call skipFunction in its runOnMachineFunction method? That's what handles skipping for optnone function and optbisect.

Thank you for mentioning that. I have added that and committed.