OLD | NEW |
---|---|
1 //===- subzero/src/IceCompileServer.cpp - Compile server ------------------===// | 1 //===- subzero/src/IceCompileServer.cpp - Compile server ------------------===// |
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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
234 Err.print(Flags.getAppName().c_str(), *Ls); | 234 Err.print(Flags.getAppName().c_str(), *Ls); |
235 return transferErrorCode(getReturnValue(Ice::EC_Bitcode)); | 235 return transferErrorCode(getReturnValue(Ice::EC_Bitcode)); |
236 } | 236 } |
237 | 237 |
238 if (Flags.getGenerateBuildAtts()) { | 238 if (Flags.getGenerateBuildAtts()) { |
239 dumpBuildAttributes(*Os.get()); | 239 dumpBuildAttributes(*Os.get()); |
240 return transferErrorCode(getReturnValue(Ice::EC_None)); | 240 return transferErrorCode(getReturnValue(Ice::EC_None)); |
241 } | 241 } |
242 | 242 |
243 Ctx.reset(new GlobalContext(Ls.get(), Os.get(), Ls.get(), ELFStr.get())); | 243 Ctx.reset(new GlobalContext(Ls.get(), Os.get(), Ls.get(), ELFStr.get())); |
244 | |
245 // TODO(tlively): Make this instantiate an instrumentation subclass | |
Karl
2016/06/06 22:27:02
Conditionalize on BuildDefs.minimal()
tlively
2016/06/07 00:43:05
Done.
| |
246 if (getFlags().getSanitizeAddresses()) | |
247 Ctx->setInstrumentation(new Instrumentation(Ctx.get())); | |
248 | |
244 if (getFlags().getNumTranslationThreads() != 0) { | 249 if (getFlags().getNumTranslationThreads() != 0) { |
245 std::thread CompileThread([this, &Flags, &InputStream]() { | 250 std::thread CompileThread([this, &Flags, &InputStream]() { |
246 Ctx->initParserThread(); | 251 Ctx->initParserThread(); |
247 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); | 252 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); |
248 }); | 253 }); |
249 CompileThread.join(); | 254 CompileThread.join(); |
250 } else { | 255 } else { |
251 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); | 256 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); |
252 } | 257 } |
253 transferErrorCode( | 258 transferErrorCode( |
254 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); | 259 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); |
255 Ctx->dumpConstantLookupCounts(); | 260 Ctx->dumpConstantLookupCounts(); |
256 Ctx->dumpStrings(); | 261 Ctx->dumpStrings(); |
257 } | 262 } |
258 | 263 |
259 } // end of namespace Ice | 264 } // end of namespace Ice |
OLD | NEW |