Page MenuHomePhabricator

[InstCombine] Support disabling expensive combines in opt

Authored by nikic on Jan 16 2020, 12:07 PM.



Currently, there is no way to disable ExpensiveCombines when doing a standalone opt -instcombine run, as that's the default, and the opt option can currently only be used to force enable, not to force disable. The only way to disable expensive combines is via -O1 or -O2, but that of course also runs the rest of the kitchen sink...

Noticed while looking into Another issue I noticed is that NewPM always enables expensive combines, whiles legacy PM on does so at -O3. Anyone know whether that was an intentional choice or an oversight?

Diff Detail

Event Timeline

nikic created this revision.Jan 16 2020, 12:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2020, 12:07 PM
spatel accepted this revision.Jan 16 2020, 12:45 PM


For the new PM question, I assume that's an oversight. I haven't looked too much into the new PM, but I have noticed other possible mistakes there. Eg, it seems like that's running the SpeculativeExecutionPass on all targets?


This revision is now accepted and ready to land.Jan 16 2020, 12:45 PM
This revision was automatically updated to reflect the committed changes.