mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +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:
@@ -13,13 +13,13 @@ declare void @f4_()
|
||||
|
||||
declare void @_Z12xxxdtsP10xxxpq()
|
||||
|
||||
define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 {
|
||||
define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
|
||||
bb:
|
||||
invoke void @f4_()
|
||||
to label %bb1 unwind label %.thread
|
||||
|
||||
.thread: ; preds = %bb
|
||||
%tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
%tmp = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %bb13
|
||||
|
||||
@@ -32,13 +32,13 @@ bb1: ; preds = %bb
|
||||
to label %bb6 unwind label %bb2
|
||||
|
||||
bb2: ; preds = %.noexc
|
||||
%tmp3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
%tmp3 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
invoke void @f3()
|
||||
to label %.body unwind label %bb4
|
||||
|
||||
bb4: ; preds = %bb2
|
||||
%tmp5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
%tmp5 = landingpad { i8*, i32 }
|
||||
catch i8* null
|
||||
unreachable
|
||||
|
||||
@@ -54,13 +54,13 @@ bb7: ; preds = %_ZN6xxxdIN12xxxyzIi
|
||||
ret void
|
||||
|
||||
bb8: ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit
|
||||
%tmp9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
%tmp9 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %_ZN10xxxpqdlev.exit
|
||||
|
||||
bb10: ; preds = %bb6, %bb1
|
||||
%.1 = phi i1 [ true, %bb1 ], [ false, %bb6 ]
|
||||
%tmp11 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
%tmp11 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %.body
|
||||
|
||||
@@ -80,7 +80,7 @@ _ZN10xxxpqdlev.exit: ; preds = %bb13, %bb12, %bb8
|
||||
resume { i8*, i32 } undef
|
||||
|
||||
bb14: ; preds = %bb13, %.body
|
||||
%tmp15 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
|
||||
%tmp15 = landingpad { i8*, i32 }
|
||||
catch i8* null
|
||||
unreachable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user