[InstCombine] Print a debug message when we constant fold an operand during worklist creation

Authored by craig.topper on Fri, Mar 17, 11:36 AM.



InstCombine tries to constant fold instruction operands during worklist building, but we don't print that we're doing this.

We also set a change flag here that causes us to rebuild and rerun the worklist one more time even if processing the worklist itself created no additional changes. So in the log I saw two inst combine runs that visited all instructions without printing that anything was changed. I may be submitting another patch to remove the change flag unless I can find some reason why we should be doing that.

Diff Detail

craig.topper created this revision.Fri, Mar 17, 11:36 AM
spatel accepted this revision.Mon, Mar 20, 8:36 AM


This revision is now accepted and ready to land.Mon, Mar 20, 8:36 AM
This revision was automatically updated to reflect the committed changes.

Sure, why not. Feel free to commit debug cleanups without pre-commit review.