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

Side by Side Diff: src/IceCompiler.cpp

Issue 1179313004: Fix a bug that would cause subzero to fail when --threads=0. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Removes (newly introduces) unused parameter warning. Created 5 years, 6 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 // This file defines a driver for translating PNaCl bitcode into native code. 10 // This file defines a driver for translating PNaCl bitcode into native code.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 std::unique_ptr<Converter> Converter(new class Converter(Mod.get(), &Ctx)); 134 std::unique_ptr<Converter> Converter(new class Converter(Mod.get(), &Ctx));
135 Converter->convertToIce(); 135 Converter->convertToIce();
136 Translator.reset(Converter.release()); 136 Translator.reset(Converter.release());
137 } else { 137 } else {
138 Ctx.getStrDump() << "Error: Build doesn't allow LLVM IR, " 138 Ctx.getStrDump() << "Error: Build doesn't allow LLVM IR, "
139 << "--build-on-read=0 not allowed\n"; 139 << "--build-on-read=0 not allowed\n";
140 return Ctx.getErrorStatus()->assign(EC_Args); 140 return Ctx.getErrorStatus()->assign(EC_Args);
141 } 141 }
142 142
143 Ctx.waitForWorkerThreads(); 143 Ctx.waitForWorkerThreads();
144 Translator->transferErrorCode(); 144 if (Translator->getErrorStatus()) {
145 Translator->emitConstants(); 145 Ctx.getErrorStatus()->assign(Translator->getErrorStatus().value());
146 } else {
147 Ctx.lowerGlobals("last");
148 Ctx.lowerProfileData();
149 Ctx.lowerConstants();
150 }
146 151
147 if (Ctx.getFlags().getOutFileType() == FT_Elf) { 152 if (Ctx.getFlags().getOutFileType() == FT_Elf) {
148 TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx); 153 TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx);
149 Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms()); 154 Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms());
150 Ctx.getObjectWriter()->writeNonUserSections(); 155 Ctx.getObjectWriter()->writeNonUserSections();
151 } 156 }
152 if (Ctx.getFlags().getSubzeroTimingEnabled()) 157 if (Ctx.getFlags().getSubzeroTimingEnabled())
153 Ctx.dumpTimers(); 158 Ctx.dumpTimers();
154 if (Ctx.getFlags().getTimeEachFunction()) { 159 if (Ctx.getFlags().getTimeEachFunction()) {
155 const bool DumpCumulative = false; 160 const bool DumpCumulative = false;
156 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); 161 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative);
157 } 162 }
158 const bool FinalStats = true; 163 const bool FinalStats = true;
159 Ctx.dumpStats("_FINAL_", FinalStats); 164 Ctx.dumpStats("_FINAL_", FinalStats);
160 } 165 }
161 166
162 } // end of namespace Ice 167 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceELFObjectWriter.h » ('j') | src/IceELFObjectWriter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698