This is an archive of the discontinued LLVM Phabricator instance.

Introduce DebugCounter into DevRemPairs pass
ClosedPublic

Authored by zhizhouy on Jul 30 2018, 5:58 PM.

Details

Summary

This patch introduces DebugCounter into DevRemPairs pass at per-transformation level.

It will provide an option skip first n or stop after n transformations for the whole DevRemPair pass.

This will make debug easier for the pass, also providing chance to do transformation level bisecting.

Diff Detail

Repository
rL LLVM

Event Timeline

zhizhouy created this revision.Jul 30 2018, 5:58 PM

Looks straightforward enough to me, but spatel authored this pass (and I've never touched it), so I'm going to defer to them :)

Happy to commit this for you when this has an LGTM

Looks straightforward enough to me, but spatel authored this pass (and I've never touched it), so I'm going to defer to them :)

Happy to commit this for you when this has an LGTM

I have the opposite problem - I don't know anything about debug counters. :)
Can you add a comment to the test file to explain what is happening there? I think we've specified that we will skip the 1st test, perform the transform on the 2nd test, and then perform no other transforms? Should there be a 4th function to verify that last case?

zhizhouy updated this revision to Diff 158322.Jul 31 2018, 10:45 AM

Can you add a comment to the test file to explain what is happening there? I think we've specified that we will skip the 1st test, perform the transform on the 2nd test, and then perform no other transforms? Should there be a 4th function to verify that last case?

Comment added. Yes, your explanation is correct according to the link.

And I also modified the test a little bit so that it will reflect more of transformation level than function level optimization.

spatel accepted this revision.Jul 31 2018, 11:02 AM

LGTM

This revision is now accepted and ready to land.Jul 31 2018, 11:02 AM

Thanks for reviewing.

George, would you mind help me land it? Thanks.

This revision was automatically updated to reflect the committed changes.