Move the JIT flags from llc to lli. These flags showed up as part of moving

backend flags in TargetOptions.h into their own class in r145714.

llvm-svn: 154993
This commit is contained in:
Nick Lewycky 2012-04-18 08:34:12 +00:00
parent cc091aac5c
commit b0e9789899
2 changed files with 28 additions and 26 deletions

View File

@ -209,29 +209,6 @@ DontPlaceZerosInBSS("nozero-initialized-in-bss",
cl::desc("Don't place zero-initialized symbols into bss section"), cl::desc("Don't place zero-initialized symbols into bss section"),
cl::init(false)); cl::init(false));
static cl::opt<bool>
EnableJITExceptionHandling("jit-enable-eh",
cl::desc("Emit exception handling information"),
cl::init(false));
// In debug builds, make this default to true.
#ifdef NDEBUG
#define EMIT_DEBUG false
#else
#define EMIT_DEBUG true
#endif
static cl::opt<bool>
EmitJitDebugInfo("jit-emit-debug",
cl::desc("Emit debug information to debugger"),
cl::init(EMIT_DEBUG));
#undef EMIT_DEBUG
static cl::opt<bool>
EmitJitDebugInfoToDisk("jit-emit-debug-to-disk",
cl::Hidden,
cl::desc("Emit debug info objfiles to disk"),
cl::init(false));
static cl::opt<bool> static cl::opt<bool>
EnableGuaranteedTailCallOpt("tailcallopt", EnableGuaranteedTailCallOpt("tailcallopt",
cl::desc("Turn fastcc calls into tail calls by (potentially) changing ABI."), cl::desc("Turn fastcc calls into tail calls by (potentially) changing ABI."),
@ -463,9 +440,6 @@ int main(int argc, char **argv) {
if (FloatABIForCalls != FloatABI::Default) if (FloatABIForCalls != FloatABI::Default)
Options.FloatABIType = FloatABIForCalls; Options.FloatABIType = FloatABIForCalls;
Options.NoZerosInBSS = DontPlaceZerosInBSS; Options.NoZerosInBSS = DontPlaceZerosInBSS;
Options.JITExceptionHandling = EnableJITExceptionHandling;
Options.JITEmitDebugInfo = EmitJitDebugInfo;
Options.JITEmitDebugInfoToDisk = EmitJitDebugInfoToDisk;
Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt; Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt;
Options.DisableTailCalls = DisableTailCalls; Options.DisableTailCalls = DisableTailCalls;
Options.StackAlignmentOverride = OverrideStackAlignment; Options.StackAlignmentOverride = OverrideStackAlignment;

View File

@ -141,6 +141,28 @@ namespace {
"Large code model"), "Large code model"),
clEnumValEnd)); clEnumValEnd));
cl::opt<bool>
EnableJITExceptionHandling("jit-enable-eh",
cl::desc("Emit exception handling information"),
cl::init(false));
cl::opt<bool>
// In debug builds, make this default to true.
#ifdef NDEBUG
#define EMIT_DEBUG false
#else
#define EMIT_DEBUG true
#endif
EmitJitDebugInfo("jit-emit-debug",
cl::desc("Emit debug information to debugger"),
cl::init(EMIT_DEBUG));
#undef EMIT_DEBUG
static cl::opt<bool>
EmitJitDebugInfoToDisk("jit-emit-debug-to-disk",
cl::Hidden,
cl::desc("Emit debug info objfiles to disk"),
cl::init(false));
} }
static ExecutionEngine *EE = 0; static ExecutionEngine *EE = 0;
@ -229,6 +251,12 @@ int main(int argc, char **argv, char * const *envp) {
} }
builder.setOptLevel(OLvl); builder.setOptLevel(OLvl);
TargetOptions Options;
Options.JITExceptionHandling = EnableJITExceptionHandling;
Options.JITEmitDebugInfo = EmitJitDebugInfo;
Options.JITEmitDebugInfoToDisk = EmitJitDebugInfoToDisk;
builder.setTargetOptions(Options);
EE = builder.create(); EE = builder.create();
if (!EE) { if (!EE) {
if (!ErrorMsg.empty()) if (!ErrorMsg.empty())