| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 static cl::opt<std::string> TimingFocusOn( | 104 static cl::opt<std::string> TimingFocusOn( |
| 105 "timing-focus", | 105 "timing-focus", |
| 106 cl::desc("Break down timing for a specific function (use '*' for all)"), | 106 cl::desc("Break down timing for a specific function (use '*' for all)"), |
| 107 cl::init("")); | 107 cl::init("")); |
| 108 | 108 |
| 109 static cl::opt<std::string> VerboseFocusOn( | 109 static cl::opt<std::string> VerboseFocusOn( |
| 110 "verbose-focus", | 110 "verbose-focus", |
| 111 cl::desc("Temporarily enable full verbosity for a specific function"), | 111 cl::desc("Temporarily enable full verbosity for a specific function"), |
| 112 cl::init("")); | 112 cl::init("")); |
| 113 | 113 |
| 114 static cl::opt<bool> | |
| 115 DisableGlobals("disable-globals", | |
| 116 cl::desc("Disable global initializer translation")); | |
| 117 | |
| 118 // This is currently unused, and is a placeholder for lit tests. | 114 // This is currently unused, and is a placeholder for lit tests. |
| 119 static cl::opt<bool> | 115 static cl::opt<bool> |
| 120 DisablePhiEdgeSplit("no-phi-edge-split", | 116 DisablePhiEdgeSplit("no-phi-edge-split", |
| 121 cl::desc("Disable edge splitting for Phi lowering")); | 117 cl::desc("Disable edge splitting for Phi lowering")); |
| 122 | 118 |
| 123 static cl::opt<bool> | 119 static cl::opt<bool> |
| 124 DumpStats("stats", | 120 DumpStats("stats", |
| 125 cl::desc("Print statistics after translating each function")); | 121 cl::desc("Print statistics after translating each function")); |
| 126 | 122 |
| 127 // This is currently needed by crosstest.py. | 123 // This is currently needed by crosstest.py. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (LogFilename != "-") { | 186 if (LogFilename != "-") { |
| 191 Lfs.open(LogFilename.c_str(), std::ofstream::out); | 187 Lfs.open(LogFilename.c_str(), std::ofstream::out); |
| 192 } | 188 } |
| 193 raw_os_ostream *Ls = new raw_os_ostream(LogFilename == "-" ? std::cout : Lfs); | 189 raw_os_ostream *Ls = new raw_os_ostream(LogFilename == "-" ? std::cout : Lfs); |
| 194 Ls->SetUnbuffered(); | 190 Ls->SetUnbuffered(); |
| 195 | 191 |
| 196 Ice::ClFlags Flags; | 192 Ice::ClFlags Flags; |
| 197 Flags.DisableInternal = DisableInternal; | 193 Flags.DisableInternal = DisableInternal; |
| 198 Flags.SubzeroTimingEnabled = SubzeroTimingEnabled; | 194 Flags.SubzeroTimingEnabled = SubzeroTimingEnabled; |
| 199 Flags.DisableTranslation = DisableTranslation; | 195 Flags.DisableTranslation = DisableTranslation; |
| 200 Flags.DisableGlobals = DisableGlobals; | |
| 201 Flags.FunctionSections = FunctionSections; | 196 Flags.FunctionSections = FunctionSections; |
| 202 Flags.DataSections = DataSections; | 197 Flags.DataSections = DataSections; |
| 203 Flags.UseIntegratedAssembler = UseIntegratedAssembler; | 198 Flags.UseIntegratedAssembler = UseIntegratedAssembler; |
| 204 Flags.UseSandboxing = UseSandboxing; | 199 Flags.UseSandboxing = UseSandboxing; |
| 205 Flags.DumpStats = DumpStats; | 200 Flags.DumpStats = DumpStats; |
| 206 Flags.AllowUninitializedGlobals = AllowUninitializedGlobals; | 201 Flags.AllowUninitializedGlobals = AllowUninitializedGlobals; |
| 207 Flags.TimeEachFunction = TimeEachFunction; | 202 Flags.TimeEachFunction = TimeEachFunction; |
| 208 Flags.DefaultGlobalPrefix = DefaultGlobalPrefix; | 203 Flags.DefaultGlobalPrefix = DefaultGlobalPrefix; |
| 209 Flags.DefaultFunctionPrefix = DefaultFunctionPrefix; | 204 Flags.DefaultFunctionPrefix = DefaultFunctionPrefix; |
| 210 Flags.TimingFocusOn = TimingFocusOn; | 205 Flags.TimingFocusOn = TimingFocusOn; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 238 if (TimeEachFunction) { | 233 if (TimeEachFunction) { |
| 239 const bool DumpCumulative = false; | 234 const bool DumpCumulative = false; |
| 240 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); | 235 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); |
| 241 } | 236 } |
| 242 if (SubzeroTimingEnabled) | 237 if (SubzeroTimingEnabled) |
| 243 Ctx.dumpTimers(); | 238 Ctx.dumpTimers(); |
| 244 const bool FinalStats = true; | 239 const bool FinalStats = true; |
| 245 Ctx.dumpStats("_FINAL_", FinalStats); | 240 Ctx.dumpStats("_FINAL_", FinalStats); |
| 246 return GetReturnValue(ErrorStatus); | 241 return GetReturnValue(ErrorStatus); |
| 247 } | 242 } |
| OLD | NEW |