mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -112,13 +112,13 @@ declare void @_ZNK4llvm19MachineInstrBuilder7addSImmEi()
|
||||
|
||||
declare i32 @__gxx_personality_v0(...)
|
||||
|
||||
define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) {
|
||||
define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) personality i32 (...)* @__gxx_personality_v0 {
|
||||
entry:
|
||||
%tmp.8.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
|
||||
to label %invoke_cont.0.i unwind label %invoke_catch.0.i ; <%"struct.llvm::TargetFrameInfo"*> [#uses=0]
|
||||
|
||||
invoke_catch.0.i: ; preds = %invoke_cont.49.i, %invoke_cont.48.i, %invoke_cont.47.i, %invoke_cont.i53.i, %no_exit.i, %invoke_cont.44.i, %invoke_cont.43.i, %invoke_cont.42.i, %invoke_cont.41.i, %invoke_cont.40.i, %invoke_cont.39.i, %invoke_cont.38.i, %invoke_cont.37.i, %then.2.i, %invoke_cont.35.i, %invoke_cont.34.i, %then.1.i, %endif.0.i, %invoke_cont.9.i, %invoke_cont.8.i, %invoke_cont.7.i, %invoke_cont.i.i, %then.0.i, %invoke_cont.4.i, %invoke_cont.3.i, %invoke_cont.2.i, %invoke_cont.1.i, %endif.0.i.i, %tmp.7.i.noexc.i, %invoke_cont.0.i, %entry
|
||||
%exn0.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn0.i = landingpad {i8*, i32}
|
||||
cleanup
|
||||
ret void
|
||||
|
||||
@@ -168,7 +168,7 @@ tmp.0.i.noexc.i: ; preds = %then.0.i
|
||||
to label %invoke_cont.i.i unwind label %cond_true.i.i
|
||||
|
||||
cond_true.i.i: ; preds = %tmp.0.i.noexc.i
|
||||
%exn.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn.i.i = landingpad {i8*, i32}
|
||||
cleanup
|
||||
ret void
|
||||
|
||||
@@ -262,7 +262,7 @@ tmp.0.i.noexc55.i: ; preds = %no_exit.i
|
||||
to label %invoke_cont.i53.i unwind label %cond_true.i52.i
|
||||
|
||||
cond_true.i52.i: ; preds = %tmp.0.i.noexc55.i
|
||||
%exn.i52.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn.i52.i = landingpad {i8*, i32}
|
||||
cleanup
|
||||
ret void
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; RUN: opt < %s -indvars -disable-output
|
||||
|
||||
define void @_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() {
|
||||
define void @_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() personality i32 (...)* @__gxx_personality_v0 {
|
||||
entry:
|
||||
%tmp.7 = invoke i32 @_ZN5ArrayISt7complexIdEE8get_sizeERK10dim_vector( )
|
||||
to label %invoke_cont.0 unwind label %cond_true.1 ; <i32> [#uses=2]
|
||||
@@ -16,7 +16,7 @@ no_exit.i: ; preds = %no_exit.i, %invoke_cont.0
|
||||
br label %no_exit.i
|
||||
|
||||
cond_true.1: ; preds = %entry
|
||||
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn = landingpad {i8*, i32}
|
||||
cleanup
|
||||
resume { i8*, i32 } %exn
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@ declare void @q_atomic_increment()
|
||||
|
||||
declare void @_Z9qt_assertPKcS0_i()
|
||||
|
||||
define void @_ZN13QMetaResourceC1EPKh() {
|
||||
define void @_ZN13QMetaResourceC1EPKh() personality i32 (...)* @__gxx_personality_v0 {
|
||||
entry:
|
||||
invoke void @_Z9qt_assertPKcS0_i( )
|
||||
to label %endif.1 unwind label %then.i.i551
|
||||
|
||||
then.i.i551: ; preds = %entry
|
||||
%exn551 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn551 = landingpad {i8*, i32}
|
||||
cleanup
|
||||
ret void
|
||||
|
||||
@@ -22,7 +22,7 @@ then.2: ; preds = %endif.1
|
||||
to label %loopentry.0 unwind label %invoke_catch.6
|
||||
|
||||
invoke_catch.6: ; preds = %then.2
|
||||
%exn6 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn6 = landingpad {i8*, i32}
|
||||
cleanup
|
||||
ret void
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ declare void @__go_undefer()
|
||||
|
||||
declare i32 @__gccgo_personality_v0(i32, i64, i8*, i8*)
|
||||
|
||||
define void @main.main() uwtable {
|
||||
define void @main.main() uwtable personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0 {
|
||||
entry:
|
||||
invoke void @__go_panic() noreturn
|
||||
to label %0 unwind label %"5.i"
|
||||
@@ -75,12 +75,12 @@ entry:
|
||||
to label %main.f.exit unwind label %"7.i"
|
||||
|
||||
"5.i": ; preds = %entry
|
||||
%1 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0
|
||||
%1 = landingpad { i8*, i32 }
|
||||
catch i8* null
|
||||
br label %"3.i"
|
||||
|
||||
"7.i": ; preds = %"3.i"
|
||||
%2 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0
|
||||
%2 = landingpad { i8*, i32 }
|
||||
catch i8* null
|
||||
br label %"3.i"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ target triple = "i386-pc-linux-gnu"
|
||||
@.str7 = external constant [24 x i8] ; <[24 x i8]*> [#uses=1]
|
||||
@C.17.316 = external constant %struct.string___XUB ; <%struct.string___XUB*> [#uses=1]
|
||||
|
||||
define void @_ada_c35503g() {
|
||||
define void @_ada_c35503g() personality i32 (...)* @__gxx_personality_v0 {
|
||||
entry:
|
||||
br label %bb
|
||||
|
||||
@@ -47,7 +47,7 @@ bb178: ; preds = %invcont127
|
||||
br label %bb123
|
||||
|
||||
lpad266: ; preds = %invcont129, %bb128, %bb123
|
||||
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn = landingpad {i8*, i32}
|
||||
cleanup
|
||||
unreachable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user