[llvm-dev] [RFC][ThinLTO] llvm-dis ThinLTO summary dump format

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 2 08:54:39 PDT 2017


On Fri, Jun 2, 2017 at 8:46 AM, Charles Saternos via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hey all,
>
> Below is the proposed format for the dump of the ThinLTO module summary in
> the llvm-dis utility:
>

Thanks, Charles. A few comments/suggestions below.


>
> > ../build/bin/llvm-dis t.o && cat t.o.ll
> ; ModuleID = '2.o'
> source_filename = "2.ll"
> target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-unknown-linux-gnu"
>
> @X = constant i32 42, section "foo", align 4
>
> @a = weak alias i32, i32* @X
>
> define void @afun() {
>   %1 = load i32, i32* @a
>   ret void
> }
>
> define void @testtest() {
>   tail call void @boop()
>   ret void
> }
>
> declare void @boop()
>
> ; Module summary:
> ;  testtest (External linkage)
> ;    Function (2 instructions)
>

I have a preference towards including the summary type (Function, Global
Variable, or Alias) on the same line as the value name. Also, it might be
better to group all functions together (adjacent) and all global variables
together, etc.


> ;    Calls: boop
>

How will it look if there is more than one callee? Do you want to put each
on a separate line like for Refs below? This would also leave room for edge
annotations (like hotness when there is profile data).


> ;  X (External linkage)
> ;    Global Variable
> ;  afun (External linkage)
> ;    Function (2 instructions)
> ;    Refs:
> ;      a
> ;  a (Weak any linkage)
> ;    Alias (aliasee X)
>
> I've implemented the above format in the llvm-dis utility, since there
> currently isn't really a way of getting ThinLTO summaries in a
> human-readable format.
>
> Let me know what you think of this format, and what information you think
> should be added/removed.
>
> Thanks,
> Charles
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>


-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/1b9a7ea5/attachment.html>


More information about the llvm-dev mailing list