llvm.org GIT mirror llvm / 57b6e9e
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 Duncan Sands 9 years ago
18 changed file(s) with 22 addition(s) and 62 deletion(s). Raw diff Collapse all Expand all
144144
145145 Make the -lowerinvoke pass insert expensive, but correct, EH code.
146146
147 =item B<-enable-eh>
148
149 Exception handling should be emitted.
147 =item B<-jit-enable-eh>
148
149 Exception handling should be enabled in the just-in-time compiler.
150150
151151 =item B<-join-liveintervals>
152152
185185
  • llc foo.bc
  • 186186
  • llc foo.bc -relocation-model=pic
  • 187187
  • llc foo.bc -relocation-model=static
  • 188
  • llc foo.bc -enable-eh
  • 189
  • llc foo.bc -relocation-model=pic -enable-eh
  • 190
  • llc foo.bc -relocation-model=static -enable-eh
  • 191188
    192189
    193190

    If none of these crash, please follow the instructions for a

    201198 -relocation-model=pic
    202199
  • bugpoint -run-llc foo.bc --tool-args
  • 203200 -relocation-model=static
    204
  • bugpoint -run-llc foo.bc --tool-args -enable-eh
  • 205
  • bugpoint -run-llc foo.bc --tool-args
  • 206 -relocation-model=pic -enable-eh
    207
  • bugpoint -run-llc foo.bc --tool-args
  • 208 -relocation-model=static -enable-eh
    209201
    210202
    211203

    Please run this, then file a bug with the instructions and reduced .bc file

    19471947 }
    19481948
    19491949 // If not set, exception handling will not be turned on
    1950 llvm::DwarfExceptionHandling = true;
    1950 llvm::JITExceptionHandling = true;
    19511951
    19521952 llvm::InitializeNativeTarget();
    19531953 llvm::LLVMContext& context = llvm::getGlobalContext();
    106106 /// crt*.o compiling).
    107107 extern bool NoZerosInBSS;
    108108
    109 /// DwarfExceptionHandling - This flag indicates that Dwarf exception
    110 /// information should be emitted.
    111 extern bool DwarfExceptionHandling;
    112
    113 /// SjLjExceptionHandling - This flag indicates that SJLJ exception
    114 /// information should be emitted.
    115 extern bool SjLjExceptionHandling;
    109 /// JITExceptionHandling - This flag indicates that the JIT should emit
    110 /// exception handling information.
    111 extern bool JITExceptionHandling;
    116112
    117113 /// JITEmitDebugInfo - This flag indicates that the JIT should try to emit
    118114 /// debug information and notify a debugger about it.
    383383 DEBUG(dbgs() << "JIT is managing a GOT\n");
    384384 }
    385385
    386 if (DwarfExceptionHandling || JITEmitDebugInfo) {
    386 if (JITExceptionHandling || JITEmitDebugInfo) {
    387387 DE.reset(new JITDwarfEmitter(jit));
    388388 }
    389389 if (JITEmitDebugInfo) {
    12581258 }
    12591259 });
    12601260
    1261 if (DwarfExceptionHandling || JITEmitDebugInfo) {
    1261 if (JITExceptionHandling || JITEmitDebugInfo) {
    12621262 uintptr_t ActualSize = 0;
    12631263 SavedBufferBegin = BufferBegin;
    12641264 SavedBufferEnd = BufferEnd;
    12811281 BufferEnd = SavedBufferEnd;
    12821282 CurBufferPtr = SavedCurBufferPtr;
    12831283
    1284 if (DwarfExceptionHandling) {
    1284 if (JITExceptionHandling) {
    12851285 TheJIT->RegisterTable(FrameRegister);
    12861286 }
    12871287
    3535 FloatABI::ABIType FloatABIType;
    3636 bool NoImplicitFloat;
    3737 bool NoZerosInBSS;
    38 bool DwarfExceptionHandling;
    39 bool SjLjExceptionHandling;
    38 bool JITExceptionHandling;
    4039 bool JITEmitDebugInfo;
    4140 bool JITEmitDebugInfoToDisk;
    4241 bool UnwindTablesMandatory;
    114113 cl::location(NoZerosInBSS),
    115114 cl::init(false));
    116115 static cl::opt
    117 EnableDwarfExceptionHandling("enable-eh",
    118 cl::desc("Emit DWARF exception handling (default if target supports)"),
    119 cl::location(DwarfExceptionHandling),
    120 cl::init(false));
    121 static cl::opt
    122 EnableSjLjExceptionHandling("enable-sjlj-eh",
    123 cl::desc("Emit SJLJ exception handling (default if target supports)"),
    124 cl::location(SjLjExceptionHandling),
    116 EnableJITExceptionHandling("jit-enable-eh",
    117 cl::desc("Emit exception handling information"),
    118 cl::location(JITExceptionHandling),
    125119 cl::init(false));
    126120 // In debug builds, make this default to true.
    127121 #ifdef NDEBUG
    0 ; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*baz | count 1
    11 ; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*quux | count 1
    2 ; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*baz | count 1
    3 ; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*quux | count 1
    42 ; Check that calls to baz and quux are tail-merged.
    53 ; PR1628
    64
    0 ; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*baz | count 1
    11 ; RUN: llc < %s -march=arm -enable-tail-merge | grep bl.*quux | count 1
    2 ; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*baz | count 1
    3 ; RUN: llc < %s -march=arm -enable-tail-merge -enable-eh | grep bl.*quux | count 1
    42 ; Check that calls to baz and quux are tail-merged.
    53 ; PR1628
    64
    11 ; RUN: llc < %s -march=arm | grep bl.*quux | count 1
    22 ; RUN: llc < %s -march=arm -enable-tail-merge=0 | grep bl.*baz | count 2
    33 ; RUN: llc < %s -march=arm -enable-tail-merge=0 | grep bl.*quux | count 2
    4 ; RUN: llc < %s -march=arm -enable-eh | grep bl.*baz | count 1
    5 ; RUN: llc < %s -march=arm -enable-eh | grep bl.*quux | count 1
    6 ; RUN: llc < %s -march=arm -enable-tail-merge=0 -enable-eh | grep bl.*baz | count 2
    7 ; RUN: llc < %s -march=arm -enable-tail-merge=0 -enable-eh | grep bl.*quux | count 2
    84 ; Check that tail merging is the default on ARM, and that -enable-tail-merge=0 works.
    95 ; PR1628
    106
    None ; RUN: llc < %s -enable-eh
    0 ; RUN: llc < %s
    11
    22 %struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* }
    33 @program_error = external global %struct.exception ; <%struct.exception*> [#uses=1]
    None ; RUN: llc < %s -enable-eh
    0 ; RUN: llc < %s
    11
    22 define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() {
    33 entry:
    None ; RUN: llc < %s -enable-eh
    0 ; RUN: llc < %s
    11 ; PR1833
    22
    33 %struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo }
    None ; RUN: llc < %s -enable-eh
    0 ; RUN: llc < %s
    11 ;; Formerly crashed, see PR 1508
    22 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"
    33 target triple = "powerpc64-apple-darwin8"
    None ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -enable-eh -o - | grep zPL
    0 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -o - | grep zPL
    11
    22 @error = external global i8 ; [#uses=2]
    33
    None ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -enable-eh -disable-fp-elim | not grep {addl .12, %esp}
    0 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -disable-fp-elim | not grep {addl .12, %esp}
    11 ; PR1398
    22
    33 %struct.S = type { i32, i32 }
    None ; RUN: llc < %s -enable-eh -asm-verbose | grep invcont131
    0 ; RUN: llc < %s -asm-verbose | grep invcont131
    11 ; PR 1496: tail merge was incorrectly removing this block
    22
    33 ; ModuleID = 'report.1.bc'
    None ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin -enable-eh | grep {isNullOrNil].eh"} | count 2
    0 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin | grep {isNullOrNil].eh"} | count 2
    11
    22 %struct.NSString = type { }
    33 %struct._objc__method_prototype_list = type opaque
    352352
    353353 Module* mergedModule = _linker.getModule();
    354354
    355 // If target supports exception handling then enable it now.
    356 switch (_target->getMCAsmInfo()->getExceptionHandlingType()) {
    357 case ExceptionHandling::Dwarf:
    358 llvm::DwarfExceptionHandling = true;
    359 break;
    360 case ExceptionHandling::SjLj:
    361 llvm::SjLjExceptionHandling = true;
    362 break;
    363 case ExceptionHandling::None:
    364 break;
    365 default:
    366 assert (0 && "Unknown exception handling model!");
    367 }
    368
    369355 // if options were requested, set them
    370356 if ( !_codegenOptions.empty() )
    371357 cl::ParseCommandLineOptions(_codegenOptions.size(),