| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // Number of translation threads (in addition to the parser thread and | 204 // Number of translation threads (in addition to the parser thread and |
| 205 // the emitter thread). The special case of 0 means purely | 205 // the emitter thread). The special case of 0 means purely |
| 206 // sequential, i.e. parser, translator, and emitter all within the | 206 // sequential, i.e. parser, translator, and emitter all within the |
| 207 // same single thread. (This may need a slight rework if we expand to | 207 // same single thread. (This may need a slight rework if we expand to |
| 208 // multiple parser or emitter threads.) | 208 // multiple parser or emitter threads.) |
| 209 static cl::opt<uint32_t> NumThreads( | 209 static cl::opt<uint32_t> NumThreads( |
| 210 "threads", | 210 "threads", |
| 211 cl::desc("Number of translation threads (0 for purely sequential)"), | 211 cl::desc("Number of translation threads (0 for purely sequential)"), |
| 212 // TODO(stichnot): Settle on a good default. Consider | 212 // TODO(stichnot): Settle on a good default. Consider |
| 213 // something related to std::thread::hardware_concurrency(). | 213 // something related to std::thread::hardware_concurrency(). |
| 214 cl::init(0)); | 214 cl::init(2)); |
| 215 | 215 |
| 216 static int GetReturnValue(int Val) { | 216 static int GetReturnValue(int Val) { |
| 217 if (AlwaysExitSuccess) | 217 if (AlwaysExitSuccess) |
| 218 return 0; | 218 return 0; |
| 219 return Val; | 219 return Val; |
| 220 } | 220 } |
| 221 | 221 |
| 222 static struct { | 222 static struct { |
| 223 const char *FlagName; | 223 const char *FlagName; |
| 224 int FlagValue; | 224 int FlagValue; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 if (SubzeroTimingEnabled) | 409 if (SubzeroTimingEnabled) |
| 410 Ctx.dumpTimers(); | 410 Ctx.dumpTimers(); |
| 411 if (TimeEachFunction) { | 411 if (TimeEachFunction) { |
| 412 const bool DumpCumulative = false; | 412 const bool DumpCumulative = false; |
| 413 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); | 413 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); |
| 414 } | 414 } |
| 415 const bool FinalStats = true; | 415 const bool FinalStats = true; |
| 416 Ctx.dumpStats("_FINAL_", FinalStats); | 416 Ctx.dumpStats("_FINAL_", FinalStats); |
| 417 return GetReturnValue(Ctx.getErrorStatus()->value()); | 417 return GetReturnValue(Ctx.getErrorStatus()->value()); |
| 418 } | 418 } |
| OLD | NEW |