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

Side by Side Diff: src/llvm2ice.cpp

Issue 902713002: Allow stubbing of called constant addresses using command line argument. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix formatting. Created 5 years, 10 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
« no previous file with comments | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 static cl::opt<bool> 165 static cl::opt<bool>
166 BuildOnRead("build-on-read", 166 BuildOnRead("build-on-read",
167 cl::desc("Build ICE instructions when reading bitcode"), 167 cl::desc("Build ICE instructions when reading bitcode"),
168 cl::init(true)); 168 cl::init(true));
169 169
170 static cl::opt<bool> AllowErrorRecovery( 170 static cl::opt<bool> AllowErrorRecovery(
171 "allow-pnacl-reader-error-recovery", 171 "allow-pnacl-reader-error-recovery",
172 cl::desc("Allow error recovery when reading PNaCl bitcode."), 172 cl::desc("Allow error recovery when reading PNaCl bitcode."),
173 cl::init(false)); 173 cl::init(false));
174 174
175 static cl::opt<bool>
jvoung (off chromium) 2015/02/05 18:50:06 Could add a TODO to remove once the emitter handle
Karl 2015/02/05 18:58:12 Done.
176 StubConstantCalls("stub-const-calls",
177 cl::desc("Stub indirect calls to constants."),
178 cl::init(false));
179
175 static cl::opt<bool> LLVMVerboseErrors( 180 static cl::opt<bool> LLVMVerboseErrors(
176 "verbose-llvm-parse-errors", 181 "verbose-llvm-parse-errors",
177 cl::desc("Print out more descriptive PNaCl bitcode parse errors when " 182 cl::desc("Print out more descriptive PNaCl bitcode parse errors when "
178 "building LLVM IR first"), 183 "building LLVM IR first"),
179 cl::init(false)); 184 cl::init(false));
180 185
181 static cl::opt<bool> 186 static cl::opt<bool>
182 UseIntegratedAssembler("integrated-as", 187 UseIntegratedAssembler("integrated-as",
183 cl::desc("Use integrated assembler (default yes)"), 188 cl::desc("Use integrated assembler (default yes)"),
184 cl::init(true)); 189 cl::init(true));
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 Flags.AllowUninitializedGlobals = AllowUninitializedGlobals; 311 Flags.AllowUninitializedGlobals = AllowUninitializedGlobals;
307 Flags.TimeEachFunction = TimeEachFunction; 312 Flags.TimeEachFunction = TimeEachFunction;
308 Flags.NumTranslationThreads = NumThreads; 313 Flags.NumTranslationThreads = NumThreads;
309 Flags.DefaultGlobalPrefix = DefaultGlobalPrefix; 314 Flags.DefaultGlobalPrefix = DefaultGlobalPrefix;
310 Flags.DefaultFunctionPrefix = DefaultFunctionPrefix; 315 Flags.DefaultFunctionPrefix = DefaultFunctionPrefix;
311 Flags.TimingFocusOn = TimingFocusOn; 316 Flags.TimingFocusOn = TimingFocusOn;
312 Flags.VerboseFocusOn = VerboseFocusOn; 317 Flags.VerboseFocusOn = VerboseFocusOn;
313 Flags.TranslateOnly = TranslateOnly; 318 Flags.TranslateOnly = TranslateOnly;
314 Flags.DisableIRGeneration = DisableIRGeneration; 319 Flags.DisableIRGeneration = DisableIRGeneration;
315 Flags.AllowErrorRecovery = AllowErrorRecovery; 320 Flags.AllowErrorRecovery = AllowErrorRecovery;
321 Flags.StubConstantCalls = StubConstantCalls;
316 322
317 // Force -build-on-read=0 for .ll files. 323 // Force -build-on-read=0 for .ll files.
318 const std::string LLSuffix = ".ll"; 324 const std::string LLSuffix = ".ll";
319 if (IRFilename.length() >= LLSuffix.length() && 325 if (IRFilename.length() >= LLSuffix.length() &&
320 IRFilename.compare(IRFilename.length() - LLSuffix.length(), 326 IRFilename.compare(IRFilename.length() - LLSuffix.length(),
321 LLSuffix.length(), LLSuffix) == 0) 327 LLSuffix.length(), LLSuffix) == 0)
322 BuildOnRead = false; 328 BuildOnRead = false;
323 329
324 // With the ELF writer, use a raw_fd_ostream to allow seeking. 330 // With the ELF writer, use a raw_fd_ostream to allow seeking.
325 // Also don't buffer, otherwise it gets pretty slow. 331 // Also don't buffer, otherwise it gets pretty slow.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 if (SubzeroTimingEnabled) 410 if (SubzeroTimingEnabled)
405 Ctx.dumpTimers(); 411 Ctx.dumpTimers();
406 if (TimeEachFunction) { 412 if (TimeEachFunction) {
407 const bool DumpCumulative = false; 413 const bool DumpCumulative = false;
408 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); 414 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative);
409 } 415 }
410 const bool FinalStats = true; 416 const bool FinalStats = true;
411 Ctx.dumpStats("_FINAL_", FinalStats); 417 Ctx.dumpStats("_FINAL_", FinalStats);
412 return GetReturnValue(Ctx.getErrorStatus()->value()); 418 return GetReturnValue(Ctx.getErrorStatus()->value());
413 } 419 }
OLDNEW
« no previous file with comments | « src/PNaClTranslator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698