A patch to reduce the output size with -print-after-all

Dear LLVM developers,

I submitted a patch to reduce the size of the output from -print-after-all option by skipping print the whole IR trees if the function is not modified by the previous pass. It reduces the size of the output by about 50%.
Since I do not have a good idea on whom I should ask review, I greatly appreciate if someone could review the patch or suggest an appropriate reviewer.

I hope LLVM developers would find this functionality useful.

Thank you so much in advance,