[PATCH] D18763: [ThinLTO] Move summary computation from BitcodeWriter to new pass
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 09:41:28 PDT 2016
tejohnson created this revision.
tejohnson added a reviewer: joker.eph.
tejohnson added a subscriber: llvm-commits.
Herald added a subscriber: joker.eph.
This is the first step in also serializing the index out to LLVM
assembly.
The per-module summary written to bitcode is moved out of the bitcode
writer and to a new analysis pass (ModuleSummaryIndexWrapperPass).
The pass itself uses a new builder class to compute index, and the
builder class is used directly in places where we don't have a pass
manager (e.g. llvm-as).
Because we are computing summaries outside of the bitcode writer, we no
longer can use value ids created by the bitcode writer's
ValueEnumerator. This required changing the reference graph edge type
to use a new ValueInfo class holding a union between a GUID (combined
index) and Value* (permodule index). The Value* are converted to the
appropriate value ID during bitcode writing.
There are a couple of NFC changes in here that I will commit separately
ahead of time (e.g. new getGlobalValueInfo() helper method).
http://reviews.llvm.org/D18763
Files:
include/llvm/Analysis/ModuleSummaryAnalysis.h
include/llvm/Bitcode/ReaderWriter.h
include/llvm/IR/ModuleSummaryIndex.h
include/llvm/InitializePasses.h
lib/Analysis/Analysis.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/ModuleSummaryAnalysis.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Bitcode/Writer/BitcodeWriterPass.cpp
lib/Bitcode/Writer/LLVMBuild.txt
lib/IR/ModuleSummaryIndex.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
lib/Transforms/IPO/FunctionImport.cpp
tools/llvm-as/CMakeLists.txt
tools/llvm-as/LLVMBuild.txt
tools/llvm-as/llvm-as.cpp
tools/llvm-lto/llvm-lto.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18763.52570.patch
Type: text/x-patch
Size: 46905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160404/1daeda78/attachment.bin>
More information about the llvm-commits
mailing list