[LLVMdev] Is there profiling that survives to transformations?

Diego Novillo dnovillo at google.com
Fri Jan 23 06:54:24 PST 2015


On Thu, Jan 22, 2015 at 11:39 AM, Vanderson Martins do Rosario
<vandersonmr2 at gmail.com> wrote:
> Hi,
>
> I'm studying LLVM for a project and I am in doubt if LLVM has a specific
> functionality.
>
> I started using GCOV profiling and GCOVFunctions, but I want that my profile
> continues being as consistent  as possible after the application of some
> transformations that changes the CFG.
>
> So I started reading some of the code from Scalar/SampleProfile.cpp and I
> would like to know if this code do that. If not, does LLVM have some thing
> to do that?

No. This code is unrelated to what you are looking for. This is the
pass that reads an external profile and applies it to the IR.

Once profile information is converted into IR annotations, it is the
responsibility of each pass to maintain them as they transform the IR.
Currently, the `prof' annotation (the annotation generated by
profiling) is maintained by most transformations.


Diego.



More information about the llvm-dev mailing list