Enable streaming of bitcode
This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. llvm-svn: 149918
This commit is contained in:
@@ -1738,11 +1738,6 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) {
|
||||
// Emit metadata.
|
||||
WriteModuleMetadata(M, VE, Stream);
|
||||
|
||||
// Emit function bodies.
|
||||
for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F)
|
||||
if (!F->isDeclaration())
|
||||
WriteFunction(*F, VE, Stream);
|
||||
|
||||
// Emit metadata.
|
||||
WriteModuleMetadataStore(M, Stream);
|
||||
|
||||
@@ -1753,6 +1748,11 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) {
|
||||
if (EnablePreserveUseListOrdering)
|
||||
WriteModuleUseLists(M, VE, Stream);
|
||||
|
||||
// Emit function bodies.
|
||||
for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F)
|
||||
if (!F->isDeclaration())
|
||||
WriteFunction(*F, VE, Stream);
|
||||
|
||||
Stream.ExitBlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user