[LLVMdev] How to calculate the transformation performed by a transformation pass?

John Criswell criswell at illinois.edu
Thu Jul 5 08:57:57 PDT 2012


On 7/4/12 10:25 AM, Rafael Parizi wrote:
> 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.

>
> -- 
> */Rafael Parizi/*
>
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120705/077da391/attachment.html>


More information about the llvm-dev mailing list