Remove the -enable-sjlj-eh option, which doesn't do anything.
authorDuncan Sands <baldrick@free.fr>
Sun, 2 May 2010 15:36:26 +0000 (15:36 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 2 May 2010 15:36:26 +0000 (15:36 +0000)
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

18 files changed:
docs/CommandGuide/lli.pod
docs/HowToSubmitABug.html
examples/ExceptionDemo/ExceptionDemo.cpp
include/llvm/Target/TargetOptions.h
lib/ExecutionEngine/JIT/JITEmitter.cpp
lib/Target/TargetMachine.cpp
test/CodeGen/ARM/2007-05-07-tailmerge-1.ll
test/CodeGen/ARM/2007-05-09-tailmerge-2.ll
test/CodeGen/ARM/2007-05-22-tailmerge-3.ll
test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll
test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
test/CodeGen/X86/2007-05-05-Personality.ll
test/CodeGen/X86/2007-05-07-InvokeSRet.ll
test/CodeGen/X86/2007-06-04-tailmerge4.ll
test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll
tools/lto/LTOCodeGenerator.cpp

index 6d1e1c65d4301c1bd4bc9796317bed3d919bc3e5..d368bec8660a4d34198d2491404119bf521a9b96 100644 (file)
@@ -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> 
 
index 0815b88cf73271f6e8e28a6cbe785c86b7da5cb2..90efbe321b1429e1fc77cf081eef70430b1f0eee 100644 (file)
@@ -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
index e3192bbed5775aa6265e4c1cf7c7ec74075fc67d..bbca963707617b3658840ce71f676711fefdd7a1 100644 (file)
@@ -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();
index fb5698f1afb8a5e2cef2b30fbb4d52b86805e624..a316c701b5424e2edf975e964953755891248756 100644 (file)
@@ -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.
index 36d4ada7c95daf455de4ec7c31432f23fbf3677d..e3855b2779280ecd1a3022f9ad5e33b81f25c2bf 100644 (file)
@@ -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);
     }
 
index d90755a3b3342da49e0b386cc091531cdedf120d..ac67c91f1706b662aedc107796e6bc40e54e4167 100644 (file)
@@ -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
index f2a8ee1a142405caf72099da39bc09b51263b3cf..52937c1dd9fce0c9a15cea3c7b2ae45565916372 100644 (file)
@@ -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
 
index 2758505811549dd82b1d2d7c762954963d3fc2fe..c925fa83ef36e062f1dada8c12825765e574106c 100644 (file)
@@ -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
 
index 061bf5e851b023681ac7d021c5ed0ebcb373e065..9df5af59a79fa2bccc6b731ec78de58951d3c187 100644 (file)
@@ -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
 
index bb774b45d8ee7daae8c0ea820a50759694756664..81347a23b864914aff829547732ee8b9af092347 100644 (file)
@@ -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]
index 4cc1e7c181ed28399e170fc45f02f2f4d8b19743..5df2200dec76d10bf1de1af8dc5589f7b327354b 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh
+; RUN: llc < %s
 
 define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() {
 entry:
index d2e97a477b449ace1e9a297288c0b7ea9b6586db..00e027b8d3c8355c9bc1d3832e69141b61b51de4 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -enable-eh
+; RUN: llc < %s
 ; PR1833
 
        %struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo }
index 439ef14d8b247312ebef319c08beddf659083598..0c11674094478af26fb6b899485596bcfe0d8c51 100644 (file)
@@ -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"
index c92783e5e4ebd45d497f3f5ad426e56c5efb4999..a9b17d3b8f362e3d5eec2ceae4a24161dda39b98 100644 (file)
@@ -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]
 
index a3ff2f60c8d7074d2688d8d6ec74701582f513bf..ae49bd00220865ae62ba2fc9029ce118804c41da 100644 (file)
@@ -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 }
index baf2377c5a02ae085c92e067818628e6a4a4d723..d5ec0898b9a953aef729a28ab647f08e1b1c4e00 100644 (file)
@@ -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'
index 56ee2a3149903c51c2f635d27f72f709495b1ee5..c3403a0b4eebf63ba1fa7da6625b82ae9e8e4d2d 100644 (file)
@@ -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
index 0eb9a48d0dec15836754f889c8347dc89b8eeab8..10105921c4eb5ff6b5ed631d820b702f1e2a9448 100644 (file)
@@ -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(),