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

Peter Collingbourne via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 2 12:18:04 PDT 2017


Why do we need a custom dumping format for the summary? Since we already
need the YAML format anyway, wouldn't it be better to extend that to cover
the entire summary?

Peter

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:
>
> > ../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)
> ;    Calls: boop
> ;  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
>
>


-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170602/79541689/attachment.html>


More information about the llvm-dev mailing list