[ThinLTO] Parse module summary index from assembly
authorTeresa Johnson <tejohnson@google.com>
Tue, 26 Jun 2018 13:56:49 +0000 (13:56 +0000)
committerTeresa Johnson <tejohnson@google.com>
Tue, 26 Jun 2018 13:56:49 +0000 (13:56 +0000)
commit63ee0e73e44e80d4e6d388de734cdb5106c8a6de
tree84f4df06ba721af4966e6f527e22e8bf9d094068
parent5915777eca88a8c14c58869219aa6fe1543a70b5
[ThinLTO] Parse module summary index from assembly

Summary:
Adds assembly parsing support for the module summary index (follow on
to r333335 which added the assembly writing support).

I added support to llvm-as to invoke the index parsing, so that it can
create either a bitcode file with a Module and a per-module index, or
a combined index without a Module.

I will send follow on patches soon to do the following:
- add support to tools such as llvm-lto2 to parse the per-module indexes
from assembly instead of bitcode when testing the thin link.
- verification support.

Depends on D47844 and D47842.

Reviewers: pcc, dexonsmith, mehdi_amini

Subscribers: inglorion, eraman, steven_wu, llvm-commits

Differential Revision: https://reviews.llvm.org/D47905

llvm-svn: 335602
20 files changed:
llvm/include/llvm/AsmParser/Parser.h
llvm/include/llvm/IR/ModuleSummaryIndex.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLLexer.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLParser.h
llvm/lib/AsmParser/LLToken.h
llvm/lib/AsmParser/Parser.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/test/Assembler/thinlto-bad-summary1.ll
llvm/test/Assembler/thinlto-bad-summary2.ll
llvm/test/Assembler/thinlto-bad-summary3.ll
llvm/test/Assembler/thinlto-summary.ll [new file with mode: 0644]
llvm/test/Bitcode/thinlto-alias.ll
llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
llvm/test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
llvm/test/Bitcode/thinlto-type-tests.ll
llvm/test/Bitcode/thinlto-type-vcalls.ll
llvm/tools/llvm-as/llvm-as.cpp