How to calculate the transformation performed by a transformation pass?

How do I know how much a transform modified a program?
For example, if I have a program that has 4 loops and another with 1 loop, and if I apply the loop-rotate pass, is sure that the first program will be more modified which the second program. Am I right?

If yes, how do I to calculate this transformation?

Many of the LLVM transforms keep statistics on what they do (e.g., how many instructions they remove, how many loops they’ve changed, etc.). Passing the -Xclang -print-stats options to clang/clang++ should get it to print out the statistics. You might find a statistic that gives you the information you want. – John T.