aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-05-02 15:36:26 +0000
committerDuncan Sands <baldrick@free.fr>2010-05-02 15:36:26 +0000
commit57b6e9eb6ccb757b74beeb377c7c16d08468d3e8 (patch)
treefcab3a667087b5e0ae19ebe62c5f92d0702ef7dc
parent241d3fea7a894014a65d3d99db1d429b871f3fce (diff)
Remove the -enable-sjlj-eh option, which doesn't do anything.
Remove the -enable-eh option which is only used by the JIT, and replace it with -jit-enable-eh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102865 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--docs/CommandGuide/lli.pod4
-rw-r--r--docs/HowToSubmitABug.html8
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp2
-rw-r--r--include/llvm/Target/TargetOptions.h10
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp6
-rw-r--r--lib/Target/TargetMachine.cpp14
-rw-r--r--test/CodeGen/ARM/2007-05-07-tailmerge-1.ll2
-rw-r--r--test/CodeGen/ARM/2007-05-09-tailmerge-2.ll2
-rw-r--r--test/CodeGen/ARM/2007-05-22-tailmerge-3.ll4
-rw-r--r--test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll2
-rw-r--r--test/CodeGen/Generic/2007-12-17-InvokeAsm.ll2
-rw-r--r--test/CodeGen/Generic/2007-12-31-UnusedSelector.ll2
-rw-r--r--test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll2
-rw-r--r--test/CodeGen/X86/2007-05-05-Personality.ll2
-rw-r--r--test/CodeGen/X86/2007-05-07-InvokeSRet.ll2
-rw-r--r--test/CodeGen/X86/2007-06-04-tailmerge4.ll2
-rw-r--r--test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll2
-rw-r--r--tools/lto/LTOCodeGenerator.cpp14
18 files changed, 21 insertions, 61 deletions
diff --git a/docs/CommandGuide/lli.pod b/docs/CommandGuide/lli.pod
index 6d1e1c65d4..d368bec866 100644
--- a/docs/CommandGuide/lli.pod
+++ b/docs/CommandGuide/lli.pod
@@ -145,9 +145,9 @@ Disable fusing of spill code into instructions.
Make the -lowerinvoke pass insert expensive, but correct, EH code.
-=item B<-enable-eh>
+=item B<-jit-enable-eh>
-Exception handling should be emitted.
+Exception handling should be enabled in the just-in-time compiler.
=item B<-join-liveintervals>
diff --git a/docs/HowToSubmitABug.html b/docs/HowToSubmitABug.html
index 0815b88cf7..90efbe321b 100644
--- a/docs/HowToSubmitABug.html
+++ b/docs/HowToSubmitABug.html
@@ -186,9 +186,6 @@ foo.bc, one of the following commands should fail:</p>
<li><tt><b>llc</b> foo.bc</tt></li>
<li><tt><b>llc</b> foo.bc -relocation-model=pic</tt></li>
<li><tt><b>llc</b> foo.bc -relocation-model=static</tt></li>
-<li><tt><b>llc</b> foo.bc -enable-eh</tt></li>
-<li><tt><b>llc</b> foo.bc -relocation-model=pic -enable-eh</tt></li>
-<li><tt><b>llc</b> foo.bc -relocation-model=static -enable-eh</tt></li>
</ol>
<p>If none of these crash, please follow the instructions for a
@@ -202,11 +199,6 @@ the one corresponding to the command above that failed):</p>
-relocation-model=pic</tt></li>
<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
-relocation-model=static</tt></li>
-<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args -enable-eh</tt></li>
-<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
- -relocation-model=pic -enable-eh</tt></li>
-<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
- -relocation-model=static -enable-eh</tt></li>
</ol>
<p>Please run this, then file a bug with the instructions and reduced .bc file
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp
index e3192bbed5..bbca963707 100644
--- a/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -1948,7 +1948,7 @@ int main(int argc, char* argv[]) {
}
// If not set, exception handling will not be turned on
- llvm::DwarfExceptionHandling = true;
+ llvm::JITExceptionHandling = true;
llvm::InitializeNativeTarget();
llvm::LLVMContext& context = llvm::getGlobalContext();
diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h
index fb5698f1af..a316c701b5 100644
--- a/include/llvm/Target/TargetOptions.h
+++ b/include/llvm/Target/TargetOptions.h
@@ -107,13 +107,9 @@ namespace llvm {
/// crt*.o compiling).
extern bool NoZerosInBSS;
- /// DwarfExceptionHandling - This flag indicates that Dwarf exception
- /// information should be emitted.
- extern bool DwarfExceptionHandling;
-
- /// SjLjExceptionHandling - This flag indicates that SJLJ exception
- /// information should be emitted.
- extern bool SjLjExceptionHandling;
+ /// JITExceptionHandling - This flag indicates that the JIT should emit
+ /// exception handling information.
+ extern bool JITExceptionHandling;
/// JITEmitDebugInfo - This flag indicates that the JIT should try to emit
/// debug information and notify a debugger about it.
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 36d4ada7c9..e3855b2779 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -384,7 +384,7 @@ namespace {
DEBUG(dbgs() << "JIT is managing a GOT\n");
}
- if (DwarfExceptionHandling || JITEmitDebugInfo) {
+ if (JITExceptionHandling || JITEmitDebugInfo) {
DE.reset(new JITDwarfEmitter(jit));
}
if (JITEmitDebugInfo) {
@@ -1259,7 +1259,7 @@ bool JITEmitter::finishFunction(MachineFunction &F) {
}
});
- if (DwarfExceptionHandling || JITEmitDebugInfo) {
+ if (JITExceptionHandling || JITEmitDebugInfo) {
uintptr_t ActualSize = 0;
SavedBufferBegin = BufferBegin;
SavedBufferEnd = BufferEnd;
@@ -1282,7 +1282,7 @@ bool JITEmitter::finishFunction(MachineFunction &F) {
BufferEnd = SavedBufferEnd;
CurBufferPtr = SavedCurBufferPtr;
- if (DwarfExceptionHandling) {
+ if (JITExceptionHandling) {
TheJIT->RegisterTable(FrameRegister);
}
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index d90755a3b3..ac67c91f17 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -36,8 +36,7 @@ namespace llvm {
FloatABI::ABIType FloatABIType;
bool NoImplicitFloat;
bool NoZerosInBSS;
- bool DwarfExceptionHandling;
- bool SjLjExceptionHandling;
+ bool JITExceptionHandling;
bool JITEmitDebugInfo;
bool JITEmitDebugInfoToDisk;
bool UnwindTablesMandatory;
@@ -115,14 +114,9 @@ DontPlaceZerosInBSS("nozero-initialized-in-bss",
cl::location(NoZerosInBSS),
cl::init(false));
static cl::opt<bool, true>
-EnableDwarfExceptionHandling("enable-eh",
- cl::desc("Emit DWARF exception handling (default if target supports)"),
- cl::location(DwarfExceptionHandling),
- cl::init(false));
-static cl::opt<bool, true>
-EnableSjLjExceptionHandling("enable-sjlj-eh",
- cl::desc("Emit SJLJ exception handling (default if target supports)"),
- cl::location(SjLjExceptionHandling),
+EnableJITExceptionHandling("jit-enable-eh",
+ cl::desc("Emit exception handling information"),
+ cl::location(JITExceptionHandling),
cl::init(false));
// In debug builds, make this default to true.
#ifdef NDEBUG
diff --git a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
index f2a8ee1a14..52937c1dd9 100644
--- a/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
+++ b/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
@@ -1,7 +1,5 @@
; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*baz | count 1
; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*quux | count 1
-; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*baz | count 1
-; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*quux | count 1
; Check that calls to baz and quux are tail-merged.
; PR1628
diff --git a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
index 2758505811..c925fa83ef 100644
--- a/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
+++ b/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
@@ -1,7 +1,5 @@
; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*baz | count 1
; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*quux | count 1
-; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*baz | count 1
-; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*quux | count 1
; Check that calls to baz and quux are tail-merged.
; PR1628
diff --git a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
index 061bf5e851..9df5af59a7 100644
--- a/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
+++ b/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
@@ -2,10 +2,6 @@
; RUN: llc < %s -march=arm | grep bl.*quux | count 1
; RUN: llc < %s -march=arm -enable-tail-merge=0 | grep bl.*baz | count 2
; RUN: llc < %s -march=arm -enable-tail-merge=0 | grep bl.*quux | count 2
-; RUN: llc < %s -march=arm -enable-eh | grep bl.*baz | count 1
-; RUN: llc < %s -march=arm -enable-eh | grep bl.*quux | count 1
-; RUN: llc < %s -march=arm -enable-tail-merge=0 -enable-eh | grep bl.*baz | count 2
-; RUN: llc < %s -march=arm -enable-tail-merge=0 -enable-eh | grep bl.*quux | count 2
; Check that tail merging is the default on ARM, and that -enable-tail-merge=0 works.
; PR1628
diff --git a/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll b/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll
index bb774b45d8..81347a23b8 100644
--- a/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll
+++ b/test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh
+; RUN: llc < %s
%struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* }
@program_error = external global %struct.exception ; <%struct.exception*> [#uses=1]
diff --git a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
index 4cc1e7c181..5df2200dec 100644
--- a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
+++ b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh
+; RUN: llc < %s
define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() {
entry:
diff --git a/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll b/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
index d2e97a477b..00e027b8d3 100644
--- a/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
+++ b/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh
+; RUN: llc < %s
; PR1833
%struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo }
diff --git a/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll b/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
index 439ef14d8b..0c11674094 100644
--- a/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
+++ b/test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh
+; RUN: llc < %s
;; Formerly crashed, see PR 1508
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc64-apple-darwin8"
diff --git a/test/CodeGen/X86/2007-05-05-Personality.ll b/test/CodeGen/X86/2007-05-05-Personality.ll
index c92783e5e4..a9b17d3b8f 100644
--- a/test/CodeGen/X86/2007-05-05-Personality.ll
+++ b/test/CodeGen/X86/2007-05-05-Personality.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i686-pc-linux-gnu -enable-eh -o - | grep zPL
+; RUN: llc < %s -mtriple=i686-pc-linux-gnu -o - | grep zPL
@error = external global i8 ; <i8*> [#uses=2]
diff --git a/test/CodeGen/X86/2007-05-07-InvokeSRet.ll b/test/CodeGen/X86/2007-05-07-InvokeSRet.ll
index a3ff2f60c8..ae49bd0022 100644
--- a/test/CodeGen/X86/2007-05-07-InvokeSRet.ll
+++ b/test/CodeGen/X86/2007-05-07-InvokeSRet.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i686-pc-linux-gnu -enable-eh -disable-fp-elim | not grep {addl .12, %esp}
+; RUN: llc < %s -mtriple=i686-pc-linux-gnu -disable-fp-elim | not grep {addl .12, %esp}
; PR1398
%struct.S = type { i32, i32 }
diff --git a/test/CodeGen/X86/2007-06-04-tailmerge4.ll b/test/CodeGen/X86/2007-06-04-tailmerge4.ll
index baf2377c5a..d5ec0898b9 100644
--- a/test/CodeGen/X86/2007-06-04-tailmerge4.ll
+++ b/test/CodeGen/X86/2007-06-04-tailmerge4.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh -asm-verbose | grep invcont131
+; RUN: llc < %s -asm-verbose | grep invcont131
; PR 1496: tail merge was incorrectly removing this block
; ModuleID = 'report.1.bc'
diff --git a/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll b/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
index 56ee2a3149..c3403a0b4e 100644
--- a/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
+++ b/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin -enable-eh | grep {isNullOrNil].eh"} | count 2
+; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin | grep {isNullOrNil].eh"} | count 2
%struct.NSString = type { }
%struct._objc__method_prototype_list = type opaque
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 0eb9a48d0d..10105921c4 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -353,20 +353,6 @@ bool LTOCodeGenerator::generateAssemblyCode(formatted_raw_ostream& out,
Module* mergedModule = _linker.getModule();
- // If target supports exception handling then enable it now.
- switch (_target->getMCAsmInfo()->getExceptionHandlingType()) {
- case ExceptionHandling::Dwarf:
- llvm::DwarfExceptionHandling = true;
- break;
- case ExceptionHandling::SjLj:
- llvm::SjLjExceptionHandling = true;
- break;
- case ExceptionHandling::None:
- break;
- default:
- assert (0 && "Unknown exception handling model!");
- }
-
// if options were requested, set them
if ( !_codegenOptions.empty() )
cl::ParseCommandLineOptions(_codegenOptions.size(),