OLD | NEW |
1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===// | 1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===// |
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 that uses LLVM capabilities to parse a | 10 // This file defines a driver that uses LLVM capabilities to parse a |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 << "--build-on-read=0 not allowed\n"; | 391 << "--build-on-read=0 not allowed\n"; |
392 return GetReturnValue(Ice::EC_Args); | 392 return GetReturnValue(Ice::EC_Args); |
393 } | 393 } |
394 | 394 |
395 Ctx.waitForWorkerThreads(); | 395 Ctx.waitForWorkerThreads(); |
396 Translator->transferErrorCode(); | 396 Translator->transferErrorCode(); |
397 Translator->emitConstants(); | 397 Translator->emitConstants(); |
398 | 398 |
399 if (UseELFWriter) { | 399 if (UseELFWriter) { |
400 Ice::TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx); | 400 Ice::TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx); |
| 401 Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms()); |
401 Ctx.getObjectWriter()->writeNonUserSections(); | 402 Ctx.getObjectWriter()->writeNonUserSections(); |
402 } | 403 } |
403 if (SubzeroTimingEnabled) | 404 if (SubzeroTimingEnabled) |
404 Ctx.dumpTimers(); | 405 Ctx.dumpTimers(); |
405 if (TimeEachFunction) { | 406 if (TimeEachFunction) { |
406 const bool DumpCumulative = false; | 407 const bool DumpCumulative = false; |
407 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); | 408 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); |
408 } | 409 } |
409 const bool FinalStats = true; | 410 const bool FinalStats = true; |
410 Ctx.dumpStats("_FINAL_", FinalStats); | 411 Ctx.dumpStats("_FINAL_", FinalStats); |
411 return GetReturnValue(Ctx.getErrorStatus()->value()); | 412 return GetReturnValue(Ctx.getErrorStatus()->value()); |
412 } | 413 } |
OLD | NEW |