mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +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:
@@ -19,7 +19,7 @@ target triple = "powerpc64-apple-darwin8"
|
||||
; CHECK: .cfi_endproc
|
||||
|
||||
|
||||
define void @Bork(i64 %range.0.0, i64 %range.0.1, i64 %size) {
|
||||
define void @Bork(i64 %range.0.0, i64 %range.0.1, i64 %size) personality i32 (...)* @__gxx_personality_v0 {
|
||||
entry:
|
||||
%effectiveRange = alloca %struct.Range, align 8 ; <%struct.Range*> [#uses=2]
|
||||
%tmp4 = call i8* @llvm.stacksave() ; <i8*> [#uses=1]
|
||||
@@ -33,7 +33,7 @@ bb30.preheader: ; preds = %entry
|
||||
br label %bb30
|
||||
|
||||
unwind: ; preds = %cond_true, %entry
|
||||
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
|
||||
%exn = landingpad {i8*, i32}
|
||||
catch i8* null
|
||||
call void @llvm.stackrestore(i8* %tmp4)
|
||||
resume { i8*, i32 } %exn
|
||||
|
||||
@@ -61,7 +61,7 @@ target triple = "powerpc64-bgq-linux"
|
||||
@.str28 = external unnamed_addr constant [7 x i8], align 1
|
||||
@_ZN4Foam4PoutE = external global %"class.Foam::prefixOSstream.27", align 8
|
||||
|
||||
define void @_ZN4Foam13checkTopologyERKNS_8polyMeshEbb(i1 zeroext %allTopology) #0 {
|
||||
define void @_ZN4Foam13checkTopologyERKNS_8polyMeshEbb(i1 zeroext %allTopology) #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
entry:
|
||||
br i1 undef, label %for.body, label %for.cond.cleanup
|
||||
|
||||
@@ -124,7 +124,7 @@ _ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit: ; preds
|
||||
to label %_ZN4Foam4wordC2EPKcb.exit unwind label %lpad.i
|
||||
|
||||
lpad.i: ; preds = %_ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit
|
||||
%0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%0 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
resume { i8*, i32 } %0
|
||||
|
||||
@@ -157,7 +157,7 @@ for.cond.cleanup69: ; preds = %_ZNSsD2Ev.exit
|
||||
br i1 undef, label %if.then121, label %if.else
|
||||
|
||||
lpad: ; preds = %_ZN4Foam4wordC2EPKcb.exit
|
||||
%1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%1 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br i1 undef, label %_ZNSsD2Ev.exit1578, label %if.then.i.i1570, !prof !1
|
||||
|
||||
@@ -181,7 +181,7 @@ if.else: ; preds = %for.cond.cleanup69
|
||||
to label %_ZN4Foam4wordC2EPKcb.exit1701 unwind label %lpad.i1689
|
||||
|
||||
lpad.i1689: ; preds = %if.else
|
||||
%2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%2 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
unreachable
|
||||
|
||||
@@ -200,12 +200,12 @@ if.then178: ; preds = %invoke.cont176
|
||||
unreachable
|
||||
|
||||
lpad165: ; preds = %_ZN4Foam4wordC2EPKcb.exit1701
|
||||
%3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%3 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
unreachable
|
||||
|
||||
lpad175: ; preds = %invoke.cont169
|
||||
%4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%4 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
invoke void @_ZN4Foam8pointSetD1Ev()
|
||||
to label %eh.resume unwind label %terminate.lpad
|
||||
@@ -215,7 +215,7 @@ if.end213: ; preds = %invoke.cont176
|
||||
to label %_ZN4Foam4wordC2EPKcb.exit1777 unwind label %lpad.i1765
|
||||
|
||||
lpad.i1765: ; preds = %if.end213
|
||||
%5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%5 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br i1 undef, label %eh.resume.i1776, label %if.then.i.i.i1767, !prof !1
|
||||
|
||||
@@ -247,12 +247,12 @@ invoke.cont231: ; preds = %_ZNSsD2Ev.exit1792
|
||||
to label %invoke.cont243 unwind label %lpad230
|
||||
|
||||
lpad217: ; preds = %_ZN4Foam4wordC2EPKcb.exit1777
|
||||
%6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%6 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %eh.resume
|
||||
|
||||
lpad230: ; preds = %invoke.cont231, %_ZNSsD2Ev.exit1792
|
||||
%7 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%7 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
invoke void @_ZN4Foam7faceSetD1Ev()
|
||||
to label %eh.resume unwind label %terminate.lpad
|
||||
@@ -262,7 +262,7 @@ invoke.cont243: ; preds = %invoke.cont231
|
||||
to label %_ZN4Foam4wordC2EPKcb.exit1862 unwind label %lpad.i1850
|
||||
|
||||
lpad.i1850: ; preds = %invoke.cont243
|
||||
%8 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%8 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
unreachable
|
||||
|
||||
@@ -283,7 +283,7 @@ if.then292: ; preds = %_ZNSsD2Ev.exit1877
|
||||
unreachable
|
||||
|
||||
lpad276: ; preds = %_ZN4Foam4wordC2EPKcb.exit1862
|
||||
%9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%9 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
unreachable
|
||||
|
||||
@@ -314,7 +314,7 @@ invoke.cont676: ; preds = %invoke.cont674
|
||||
to label %if.end878 unwind label %lpad663
|
||||
|
||||
lpad663: ; preds = %invoke.cont670, %if.end660, %invoke.cont668, %invoke.cont674, %invoke.cont676
|
||||
%10 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%10 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br i1 undef, label %_ZN4Foam4ListIiED2Ev.exit.i3073, label %delete.notnull.i.i3071
|
||||
|
||||
@@ -342,7 +342,7 @@ if.else888: ; preds = %_ZN4Foam11regionSpl
|
||||
to label %_ZN4Foam4wordC2EPKcb.exit3098 unwind label %lpad.i3086
|
||||
|
||||
lpad.i3086: ; preds = %if.else888
|
||||
%11 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%11 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
unreachable
|
||||
|
||||
@@ -371,7 +371,7 @@ invoke.cont906: ; preds = %call.i3116.noexc
|
||||
unreachable
|
||||
|
||||
lpad898: ; preds = %_ZN4Foam4wordC2EPKcb.exit3098
|
||||
%12 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%12 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br i1 undef, label %_ZNSsD2Ev.exit3204, label %if.then.i.i3196, !prof !1
|
||||
|
||||
@@ -382,7 +382,7 @@ _ZNSsD2Ev.exit3204: ; preds = %lpad898
|
||||
unreachable
|
||||
|
||||
lpad905.loopexit.split-lp: ; preds = %call.i3116.noexc, %_ZNSsD2Ev.exit3113
|
||||
%lpad.loopexit.split-lp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%lpad.loopexit.split-lp = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
invoke void @_ZN4Foam8pointSetD1Ev()
|
||||
to label %eh.resume unwind label %terminate.lpad
|
||||
@@ -391,7 +391,7 @@ eh.resume: ; preds = %_ZN4Foam4ListIiED2E
|
||||
resume { i8*, i32 } undef
|
||||
|
||||
terminate.lpad: ; preds = %_ZN4Foam4ListIiED2Ev.exit.i3073, %lpad230, %lpad175, %lpad905.loopexit.split-lp
|
||||
%13 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%13 = landingpad { i8*, i32 }
|
||||
catch i8* null
|
||||
unreachable
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ target triple = "powerpc64-bgq-linux"
|
||||
%"class.boost::serialization::extended_type_info.129.150" = type { i32 (...)**, i32, i8* }
|
||||
|
||||
; Function Attrs: noinline
|
||||
define void @_ZN5boost13serialization18extended_type_info4findEPKc() #0 align 2 {
|
||||
define void @_ZN5boost13serialization18extended_type_info4findEPKc() #0 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
entry:
|
||||
br i1 undef, label %cond.true, label %cond.false
|
||||
|
||||
@@ -42,7 +42,7 @@ if.then: ; preds = %invoke.cont.2
|
||||
br label %cleanup
|
||||
|
||||
lpad: ; preds = %cond.end
|
||||
%2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%2 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %eh.resume
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ target triple = "powerpc64-bgq-linux"
|
||||
declare i32 @__gxx_personality_v0(...)
|
||||
|
||||
; Function Attrs: optsize
|
||||
define void @_ZNSt3__117__assoc_sub_state4copyEv(%"class.std::__1::__assoc_sub_state"* %this) #0 align 2 {
|
||||
define void @_ZNSt3__117__assoc_sub_state4copyEv(%"class.std::__1::__assoc_sub_state"* %this) #0 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
entry:
|
||||
%__lk = alloca %"class.std::__1::unique_lock", align 8
|
||||
%ref.tmp = alloca %"class.std::__exception_ptr::exception_ptr", align 8
|
||||
@@ -50,14 +50,14 @@ invoke.cont4: ; preds = %if.then
|
||||
unreachable
|
||||
|
||||
lpad: ; preds = %entry
|
||||
%1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%1 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
%2 = extractvalue { i8*, i32 } %1, 0
|
||||
%3 = extractvalue { i8*, i32 } %1, 1
|
||||
br label %ehcleanup
|
||||
|
||||
lpad3: ; preds = %if.then
|
||||
%4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%4 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
%5 = extractvalue { i8*, i32 } %4, 0
|
||||
%6 = extractvalue { i8*, i32 } %4, 1
|
||||
|
||||
@@ -46,7 +46,7 @@ declare void @_ZN4Foam7IOerror4exitEi() #0
|
||||
; Function Attrs: inlinehint
|
||||
declare void @_ZN4Foam8fileName12stripInvalidEv() #2 align 2
|
||||
|
||||
define void @_ZN4Foam3CSVINS_6VectorIdEEE4readEv() #0 align 2 {
|
||||
define void @_ZN4Foam3CSVINS_6VectorIdEEE4readEv() #0 align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
entry:
|
||||
invoke void @_ZN4Foam6string6expandEb()
|
||||
to label %invoke.cont unwind label %lpad
|
||||
@@ -66,7 +66,7 @@ _ZN4Foam6stringC2ERKS0_.exit.i: ; preds = %invoke.cont
|
||||
to label %invoke.cont2 unwind label %lpad.i
|
||||
|
||||
lpad.i: ; preds = %_ZN4Foam6stringC2ERKS0_.exit.i
|
||||
%0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%0 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %ehcleanup142
|
||||
|
||||
@@ -90,17 +90,17 @@ memptr.end.i: ; preds = %invoke.cont8
|
||||
to label %if.end unwind label %lpad5
|
||||
|
||||
lpad: ; preds = %if.then.i.i.i.i176, %entry
|
||||
%1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%1 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %ehcleanup142
|
||||
|
||||
lpad3: ; preds = %invoke.cont2
|
||||
%2 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%2 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %ehcleanup142
|
||||
|
||||
lpad5: ; preds = %memptr.end.i, %invoke.cont8, %if.then
|
||||
%3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%3 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %ehcleanup142
|
||||
|
||||
@@ -119,12 +119,12 @@ invoke.cont.i.i.i: ; preds = %.noexc205
|
||||
unreachable
|
||||
|
||||
lpad.i.i.i: ; preds = %.noexc205
|
||||
%4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%4 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %ehcleanup142
|
||||
|
||||
lpad19: ; preds = %for.body
|
||||
%5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%5 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
br label %ehcleanup142
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ declare void @_ZN13CStdOutStream5FlushEv()
|
||||
|
||||
declare i32 @__gxx_personality_v0(...)
|
||||
|
||||
define void @_Z11GetPasswordP13CStdOutStreamb() {
|
||||
define void @_Z11GetPasswordP13CStdOutStreamb() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
|
||||
entry:
|
||||
br label %for.cond.i.i
|
||||
|
||||
@@ -41,7 +41,7 @@ for.cond.i.i30: ; preds = %for.cond.i.i30, %in
|
||||
br label %for.cond.i.i30
|
||||
|
||||
lpad: ; preds = %invoke.cont4, %invoke.cont, %_ZN11CStringBaseIcEC2EPKc.exit.critedge
|
||||
%1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
||||
%1 = landingpad { i8*, i32 }
|
||||
cleanup
|
||||
resume { i8*, i32 } undef
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user