[LLVMdev] counting branch frequencies
apala guha
aguha at uchicago.edu
Tue Sep 11 08:20:38 PDT 2012
Thanks Alastair.
Is it possible to associate the branch frequency counts with the basic blocks
in the intermediate representation? (e.g. Can I access basic block
frequencies in runOnFunction()?)
Also, I was able to produce a 'llvmprof.out' file. What is the format of this file? How can I parse it?
Thanks.
-Apala
>
>
> On 09/07/2012 01:25 PM, Alastair Murray wrote:
> > Hi Apala,
> >
> > Do you mean is it possible to count branch taken/not-taken frequencies?
> >
> > If so then in the svn version (i.e. not 3.1) there is
> > -profile-metadata-loader which sets branch weight metadata based on
> > profiling data (compile with -insert-edge-profiling and run your
> > program to generate that).
> >
> > Within 3.1 there is -profile-loader which sets block execution counts
> > which can be used to infer branch taken/not-taken frequencies -- but
> > the whole interface is not as friendly.
> >
> > Regards,
> > Alastair.
> >
> > On 07/09/12 10:46, Apala Guha wrote:
> >> Hi,
> >>
> >> Is there a way to count branch frequencies using LLVM infrastructure?
> >>
> >> Thanks.
> >>
> >> -Apala
> >>
> >> Postdoctoral Scholar
> >>
> >> Department of Computer Science, University of Chicago
> >>
> >> Computation Institute, Argonne National Laboratory
> >>
> >> http://sites.google.com/site/apalaguha/home/
> >>
> >>
> >>
> >> _______________________________________________
> >> LLVM Developers mailing list
> >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >>
> >
>
More information about the llvm-dev
mailing list