Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: src/IceCompiler.cpp

Issue 1834473002: Allow Subzero to parse function blocks in parallel. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up code. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===// 1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 llvm::getGlobalContext(), DiagnosticHandler); 107 llvm::getGlobalContext(), DiagnosticHandler);
108 if (!Mod) { 108 if (!Mod) {
109 Err.print(Flags.getAppName().c_str(), llvm::errs()); 109 Err.print(Flags.getAppName().c_str(), llvm::errs());
110 Ctx.getErrorStatus()->assign(EC_Bitcode); 110 Ctx.getErrorStatus()->assign(EC_Bitcode);
111 return; 111 return;
112 } 112 }
113 113
114 std::unique_ptr<Converter> Converter(new class Converter(Mod.get(), &Ctx)); 114 std::unique_ptr<Converter> Converter(new class Converter(Mod.get(), &Ctx));
115 Converter->convertToIce(); 115 Converter->convertToIce();
116 Translator.reset(Converter.release()); 116 Translator.reset(Converter.release());
117 Ctx.waitForWorkerThreads();
John 2016/03/24 17:32:34 I don't understand this change.
Karl 2016/03/24 17:37:49 For the bitcode reader, we must move this call ins
John 2016/03/24 17:44:00 ok, maybe add a comment here? I get nervous when I
Karl 2016/03/24 22:35:25 I looked at the code more carefully, and (due to p
117 } else { 118 } else {
118 Ctx.getStrError() << "Error: Build doesn't allow LLVM IR, " 119 Ctx.getStrError() << "Error: Build doesn't allow LLVM IR, "
119 << "--build-on-read=0 not allowed\n"; 120 << "--build-on-read=0 not allowed\n";
120 Ctx.getErrorStatus()->assign(EC_Args); 121 Ctx.getErrorStatus()->assign(EC_Args);
121 return; 122 return;
122 } 123 }
123 124
124 Ctx.waitForWorkerThreads();
125 if (Translator->getErrorStatus()) { 125 if (Translator->getErrorStatus()) {
126 Ctx.getErrorStatus()->assign(Translator->getErrorStatus().value()); 126 Ctx.getErrorStatus()->assign(Translator->getErrorStatus().value());
127 } else { 127 } else {
128 Ctx.lowerGlobals("last"); 128 Ctx.lowerGlobals("last");
129 Ctx.lowerProfileData(); 129 Ctx.lowerProfileData();
130 Ctx.lowerConstants(); 130 Ctx.lowerConstants();
131 Ctx.lowerJumpTables(); 131 Ctx.lowerJumpTables();
132 132
133 if (Ctx.getFlags().getOutFileType() == FT_Elf) { 133 if (Ctx.getFlags().getOutFileType() == FT_Elf) {
134 TimerMarker T1(Ice::TimerStack::TT_emitAsm, &Ctx); 134 TimerMarker T1(Ice::TimerStack::TT_emitAsm, &Ctx);
135 Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms()); 135 Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms());
136 Ctx.getObjectWriter()->writeNonUserSections(); 136 Ctx.getObjectWriter()->writeNonUserSections();
137 } 137 }
138 } 138 }
139 139
140 if (Ctx.getFlags().getSubzeroTimingEnabled()) 140 if (Ctx.getFlags().getSubzeroTimingEnabled())
141 Ctx.dumpTimers(); 141 Ctx.dumpTimers();
142 142
143 if (Ctx.getFlags().getTimeEachFunction()) { 143 if (Ctx.getFlags().getTimeEachFunction()) {
144 constexpr bool NoDumpCumulative = false; 144 constexpr bool NoDumpCumulative = false;
145 Ctx.dumpTimers(GlobalContext::TSK_Funcs, NoDumpCumulative); 145 Ctx.dumpTimers(GlobalContext::TSK_Funcs, NoDumpCumulative);
146 } 146 }
147 constexpr bool FinalStats = true; 147 constexpr bool FinalStats = true;
148 Ctx.dumpStats("_FINAL_", FinalStats); 148 Ctx.dumpStats("_FINAL_", FinalStats);
149 } 149 }
150 150
151 } // end of namespace Ice 151 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceClFlags.def ('k') | src/IceGlobalContext.h » ('j') | src/IceTranslator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698