Page MenuHomePhabricator

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

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

Details

Summary

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

Diff Detail

Event Timeline

samtebbs created this revision.Thu, Jan 14, 7:52 AM
samtebbs requested review of this revision.Thu, Jan 14, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Jan 14, 7:52 AM
SjoerdMeijer accepted this revision.Thu, Jan 14, 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.Thu, Jan 14, 7:58 AM
samtebbs updated this revision to Diff 316671.Thu, Jan 14, 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.Fri, Jan 15, 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.