diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-06-17 20:52:32 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-06-17 20:52:32 +0000 |
| commit | 7fddeccb8b4694002e3a2130d4bce07d628b1db2 (patch) | |
| tree | 01bc06f3a0d026c80340d658807481ae33240033 /llvm/test/Transforms/ADCE | |
| parent | f32991461f301bbc99c17cc51fd44a50d2012179 (diff) | |
| download | bcm5719-llvm-7fddeccb8b4694002e3a2130d4bce07d628b1db2.tar.gz bcm5719-llvm-7fddeccb8b4694002e3a2130d4bce07d628b1db2.zip | |
Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.
This isn't desirable because:
- All LandingPadInsts in the same function must have the same
personality routine. This means that each LandingPadInst beyond the
first has an operand which produces no additional information.
- There is ongoing work to introduce EH IR constructs other than
LandingPadInst. Moving the personality routine off of any one
particular Instruction and onto the parent function seems a lot better
than have N different places a personality function can sneak onto an
exceptional function.
Differential Revision: http://reviews.llvm.org/D10429
llvm-svn: 239940
Diffstat (limited to 'llvm/test/Transforms/ADCE')
| -rw-r--r-- | llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Transforms/ADCE/dce_pure_invoke.ll | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll b/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll index 6bbcfdb67ec..607bf2e5809 100644 --- a/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll +++ b/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -adce -disable-output -define void @test() { +define void @test() personality i32 (...)* @__gxx_personality_v0 { br i1 false, label %then, label %endif then: ; preds = %0 @@ -8,7 +8,7 @@ then: ; preds = %0 to label %invoke_cont unwind label %invoke_catch invoke_catch: ; preds = %then - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn diff --git a/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll b/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll index 4ddc2f180a2..068ad2bc1d8 100644 --- a/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll +++ b/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll @@ -6,7 +6,7 @@ declare void @_ZN10QByteArray6resizeEi() declare void @q_atomic_decrement() -define void @_ZNK10QByteArray13leftJustifiedEicb() { +define void @_ZNK10QByteArray13leftJustifiedEicb() personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @strlen( ) to label %tmp.3.i.noexc unwind label %invoke_catch.0 @@ -15,7 +15,7 @@ tmp.3.i.noexc: ; preds = %entry br i1 false, label %then.0, label %else.0 invoke_catch.0: ; preds = %entry - %exn.0 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.0 = landingpad {i8*, i32} cleanup invoke void @q_atomic_decrement( ) to label %tmp.1.i.i183.noexc unwind label %terminate @@ -28,7 +28,7 @@ then.0: ; preds = %tmp.3.i.noexc to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %then.0 - %exn.1 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn.1 = landingpad {i8*, i32} cleanup invoke void @q_atomic_decrement( ) to label %tmp.1.i.i162.noexc unwind label %terminate @@ -44,7 +44,7 @@ else.0: ; preds = %tmp.3.i.noexc terminate: ; preds = %invoke_catch.1, %invoke_catch.0 %dbg.0.1 = phi { }* [ null, %invoke_catch.1 ], [ null, %invoke_catch.0 ] ; <{ }*> [#uses=0] - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup unreachable } diff --git a/llvm/test/Transforms/ADCE/dce_pure_invoke.ll b/llvm/test/Transforms/ADCE/dce_pure_invoke.ll index 8e785180457..e01c9feaeb0 100644 --- a/llvm/test/Transforms/ADCE/dce_pure_invoke.ll +++ b/llvm/test/Transforms/ADCE/dce_pure_invoke.ll @@ -2,7 +2,7 @@ declare i32 @strlen(i8*) readnone -define i32 @test() { +define i32 @test() personality i32 (...)* @__gxx_personality_v0 { ; invoke of pure function should not be deleted! invoke i32 @strlen( i8* null ) readnone to label %Cont unwind label %Other ; <i32>:1 [#uses=0] @@ -11,7 +11,7 @@ Cont: ; preds = %0 ret i32 0 Other: ; preds = %0 - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 1 } |

