This is an archive of the discontinued LLVM Phabricator instance.

[VectorCombine] add a debug flag to skip all transforms
ClosedPublic

Authored by spatel on Feb 26 2020, 11:46 AM.

Details

Summary

As suggested in D75145 (and seems obviously good, but posting for review in case I'm missing some reason to implement it differently).

I'm not sure why, but several passes have this kind of disable/enable flag implemented at the pass manager level. But that means we have to duplicate the flag for both pass managers and add code to check the flag every time the pass appears in the pipeline.

We want a debug option to see if this pass is misbehaving regardless of the pass managers, so just add a disablement check at the single point before any transforms run.

Diff Detail

Event Timeline

spatel created this revision.Feb 26 2020, 11:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2020, 11:46 AM
lebedev.ri accepted this revision.Feb 26 2020, 12:03 PM

It kind-of makes sense to put it into pipeline, since then it is obvious
(in the debug output) that the pass doesn't actually run when disabled.
But since this defaults to on, i really don't see the point
in putting it there, so LG, thank you.

This revision is now accepted and ready to land.Feb 26 2020, 12:03 PM
This revision was automatically updated to reflect the committed changes.