llvm.org GIT mirror llvm / 47e208b
Try to eliminate the use of the 'unwind' instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139046 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 8 years ago
11 changed file(s) with 23 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
1010 cleanup144: ; preds = %entry
1111 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
1212 cleanup
13 unwind
13 resume { i8*, i32 } %exn
1414 }
1515
1616 declare i32 @__gxx_personality_v0(...)
1010 br i1 false, label %UnifiedUnwindBlock, label %UnifiedReturnBlock
1111
1212 UnifiedUnwindBlock: ; preds = %invoke_catch.0
13 unwind
13 unreachable
1414 }
1515
2020 to label %tmp.1.i.i183.noexc unwind label %terminate
2121
2222 tmp.1.i.i183.noexc: ; preds = %invoke_catch.0
23 unwind
23 ret void
2424
2525 then.0: ; preds = %tmp.3.i.noexc
2626 invoke void @_ZN10QByteArray6resizeEi( )
99 r:
1010 ret i32 0
1111 u:
12 unwind
12 unreachable
1313 }
1414
1515 define i32 @caller() {
109109 to label %.noexc unwind label %lpad119 ; [#uses=1]
110110
111111 lpad: ; preds = %_ZN7cObjectnwEj.exit
112 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
113 cleanup
112114 br label %Unwind
113115
114116 lpad119: ; preds = %bb106, %invcont104, %invcont103, %bb102, %bb49, %bb34, %bb12, %invcont10, %invcont9, %bb8
117 %exn119 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
118 cleanup
115119 unreachable
116120
117121 lpad123: ; preds = %.noexc
122 %exn123 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
123 cleanup
118124 %tmp5 = icmp eq i8* %tmp4, null ; [#uses=1]
119125 br i1 %tmp5, label %Unwind, label %bb.i2
120126
124130 Unwind: ; preds = %bb.i2, %lpad123, %lpad
125131 unreachable
126132 }
133
134 declare i32 @__gxx_personality_v0(...)
127135
128136 declare void @_ZN8EtherBus8tokenizeEPKcRSt6vectorIdSaIdEE(i8* nocapture, i8*, i8*)
129137
460460 %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
461461 cleanup
462462 call void @_ZN8QPainterD1Ev( %struct.QPainter* %p )
463 unwind
463 resume { i8*, i32 } %val
464464 }
465465
466466 declare void @_ZN6QSizeFC1Edd(%struct.QPointF*, double, double)
1414 ret i32 42
1515
1616 bb6:
17 unwind
17 ret i32 927
1818 }
1919
2020 define i32 @test2(i32 %tmp21, i32 %tmp24, i1 %tmp34) {
2525 bb6:
2626 ret i32 42
2727 bb7:
28 unwind
28 ret i32 927
2929 }
3030
462462 %val329 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
463463 cleanup
464464 call void @_ZN8QPainterD1Ev( %struct.QPainter* %p )
465 unwind
465 resume { i8*, i32 } %val329
466466 }
467467
468468 declare void @_ZN6QSizeFC1Edd(%struct.QPointF*, double, double)
1313 ret void
1414
1515 u: ; preds = %entry
16 unwind
16 %val = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
17 cleanup
18 resume { i8*, i32 } %val
1719 }
20
21 declare i32 @__gxx_personality_v0(...)
99 call void @test( i1 %C )
1010 br label %X
1111 X: ; preds = %B, %A
12 unwind
12 ret void
1313 }
1414
1515 br i1 %tmp2, label %if, label %else
1616
1717 if: ; preds = %entry
18 unwind
18 ret i32 37
1919
2020 else: ; preds = %entry
2121 %tmp7 = add i32 %start_arg, 1 ; [#uses=1]