[llvm-dev] RFC: Pass to prune redundant profiling instrumentation

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 10 20:42:20 PST 2016


>
>
> >
> >     These functions are left around by the inliner (it doesn't know that
> >     they're safe to delete). Deleting them reduces code size and
> simplifies
> >     subsequent analysis of profile counters.
>
> I think that this is something global-DCE should be teached about (if it
> does not know already).
>
> What attribute do you think we could use to do that?

> >  4. Emit the aliases into a new section in the binary.
> >
> >     Aliases are represented as { Dst: i64*, Src: i64* } tuples. Some
> changes
> >     in compiler-rt are required to walk the alias section and fill in the
> >     correct execution counts at program exit time.
> >
> > This pass needs to be run after the inliner in order to be effective.
> >
> > The complexity of this pass is O(N*M), where N is the number of profile
> > counters, and M is the average number of updates per counter.
>
> What you're describing here is not clear to me? But I may have been
> totally misunderstanding the whole concept :)
>
Also, describing the complexity like this is strange.
It should be just O(N) where N is the number of instructions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160310/ef8b80fa/attachment.html>


More information about the llvm-dev mailing list