diff options
author | Duncan Sands <baldrick@free.fr> | 2008-09-06 17:19:29 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-09-06 17:19:29 +0000 |
commit | fec2c2bf5ea14679f8a2d74a72bdec76f05fa001 (patch) | |
tree | 3168dc0eb88a1e642f32e7dc1dc026434b7b7072 | |
parent | 3b217c6f5c21a5f16670b14e3beeaff5ee74df1c (diff) |
When PruneEH turned an invoke into an ordinary
call (thus changing the call site) it didn't
inform the callgraph about this. But the
call site does matter - as shown by the testcase,
the callgraph become invalid after the inliner
ran (with an edge between two functions simply
missing), resulting in wrong deductions by
GlobalsModRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55872 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/CallGraph.h | 5 | ||||
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 15 | ||||
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 6 | ||||
-rw-r--r-- | test/Transforms/PruneEH/2008-09-05-CGUpdate.ll | 1438 |
4 files changed, 1463 insertions, 1 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 5fd0bdc8a0..00c804c4ca 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -235,6 +235,11 @@ public: /// removeCallEdgeTo, so it should not be used unless necessary. void removeAnyCallEdgeTo(CallGraphNode *Callee); + /// replaceCallSite - Make the edge in the node for Old CallSite be for + /// New CallSite instead. Note that this method takes linear time, so it + /// should be used sparingly. + void replaceCallSite(CallSite Old, CallSite New); + friend class CallGraph; // CallGraphNode ctor - Create a node for the specified function. diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 5616ee9a4b..c8f25b07b8 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -297,7 +297,7 @@ void CallGraphNode::removeCallEdgeTo(CallGraphNode *Callee) { /// should be used sparingly. void CallGraphNode::removeCallEdgeFor(CallSite CS) { for (unsigned i = CalledFunctions.size(); ; --i) { - assert(i && "Cannot find callee to remove!"); + assert(i && "Cannot find callsite to remove!"); if (CalledFunctions[i-1].first == CS) { CalledFunctions.erase(CalledFunctions.begin()+i-1); return; @@ -318,5 +318,18 @@ void CallGraphNode::removeAnyCallEdgeTo(CallGraphNode *Callee) { } } +/// replaceCallSite - Make the edge in the node for Old CallSite be for +/// New CallSite instead. Note that this method takes linear time, so it +/// should be used sparingly. +void CallGraphNode::replaceCallSite(CallSite Old, CallSite New) { + for (unsigned i = CalledFunctions.size(); ; --i) { + assert(i && "Cannot find callsite to replace!"); + if (CalledFunctions[i-1].first == Old) { + CalledFunctions[i-1].first = New; + return; + } + } +} + // Enuse that users of CallGraph.h also link with this file DEFINING_FILE_FOR(CallGraph) diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 8fb904b1ea..630768fbdc 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -156,6 +156,9 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) { // function if we have invokes to non-unwinding functions or code after calls to // no-return functions. bool PruneEH::SimplifyFunction(Function *F) { + CallGraph &CG = getAnalysis<CallGraph>(); + CallGraphNode *CGN = CG[F]; + bool MadeChange = false; for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) @@ -174,6 +177,9 @@ bool PruneEH::SimplifyFunction(Function *F) { BasicBlock *UnwindBlock = II->getUnwindDest(); UnwindBlock->removePredecessor(II->getParent()); + // Fix up the call graph. + CGN->replaceCallSite(II, Call); + // Insert a branch to the normal destination right before the // invoke. BranchInst::Create(II->getNormalDest(), II); diff --git a/test/Transforms/PruneEH/2008-09-05-CGUpdate.ll b/test/Transforms/PruneEH/2008-09-05-CGUpdate.ll new file mode 100644 index 0000000000..02f88cae92 --- /dev/null +++ b/test/Transforms/PruneEH/2008-09-05-CGUpdate.ll @@ -0,0 +1,1438 @@ +; RUN: llvm-as < %s | opt -prune-eh -inline -globalsmodref-aa -markmodref | llvm-dis | not grep {define.*read} + %struct.FRAME.ce3806g = type { %struct.string___XUB, %struct.string___XUB, %struct.string___XUB, %struct.string___XUB } + %struct.FRAME.ce3806g__fxio__put__4 = type { i32, i32, i32, %struct.system__file_control_block__pstring*, i32, i32, i8 } + %struct.RETURN = type { i8, i32 } + %struct.ada__streams__root_stream_type = type { %struct.ada__tags__dispatch_table* } + %struct.ada__tags__dispatch_table = type { [1 x i32] } + %struct.ada__tags__select_specific_data = type { i32, %struct.ada__tags__select_specific_data_element } + %struct.ada__tags__select_specific_data_element = type { i32, i8 } + %struct.ada__tags__type_specific_data = type { i32, i32, [2147483647 x i8]*, [2147483647 x i8]*, %struct.ada__tags__dispatch_table*, i8, i32, i32, i32, i32, [2 x %struct.ada__tags__dispatch_table*] } + %struct.ada__text_io__text_afcb = type { %struct.system__file_control_block__afcb, i32, i32, i32, i32, i32, %struct.ada__text_io__text_afcb*, i8, i8 } + %struct.exception = type { i8, i8, i32, i8*, i8*, i32, i8* } + %struct.long_long_float___PAD = type { x86_fp80, [1 x i32] } + %struct.string___XUB = type { i32, i32 } + %struct.system__file_control_block__afcb = type { %struct.ada__streams__root_stream_type, i32, %struct.system__file_control_block__pstring, %struct.system__file_control_block__pstring, i8, i8, i8, i8, i8, i8, i8, %struct.system__file_control_block__afcb*, %struct.system__file_control_block__afcb* } + %struct.system__file_control_block__pstring = type { i8*, %struct.string___XUB* } + %struct.system__finalization_implementation__limited_record_controller = type { %struct.system__finalization_root__root_controlled, %struct.system__finalization_root__root_controlled* } + %struct.system__finalization_implementation__record_controller = type { %struct.system__finalization_implementation__limited_record_controller, i32 } + %struct.system__finalization_root__empty_root_controlled = type { %struct.ada__tags__dispatch_table* } + %struct.system__finalization_root__root_controlled = type { %struct.ada__streams__root_stream_type, %struct.system__finalization_root__root_controlled*, %struct.system__finalization_root__root_controlled* } + %struct.system__secondary_stack__mark_id = type { i32, i32 } + %struct.system__standard_library__exception_data = type { i8, i8, i32, i32, %struct.system__standard_library__exception_data*, i32, void ()* } +@.str = internal constant [12 x i8] c"system.ads\00\00" ; <[12 x i8]*> [#uses=1] +@.str1 = internal constant [14 x i8] c"a-tifiio.adb\00\00" ; <[14 x i8]*> [#uses=1] +@system__soft_links__abort_undefer = external global void ()* ; <void ()**> [#uses=6] +@.str2 = internal constant [47 x i8] c"a-tifiio.adb:327 instantiated at ce3806g.adb:52" ; <[47 x i8]*> [#uses=1] +@C.354.2200 = internal constant %struct.string___XUB { i32 1, i32 47 } ; <%struct.string___XUB*> [#uses=1] +@ada__io_exceptions__data_error = external global %struct.exception ; <%struct.exception*> [#uses=1] +@constraint_error = external global %struct.exception ; <%struct.exception*> [#uses=2] +@__gnat_all_others_value = external constant i32 ; <i32*> [#uses=21] +@.str3 = internal constant [10 x i8] c"0123456789" ; <[10 x i8]*> [#uses=2] +@ada__text_io__current_out = external global %struct.ada__text_io__text_afcb* ; <%struct.ada__text_io__text_afcb**> [#uses=1] +@.str4 = internal constant [126 x i8] c"CHECK THAT FIXED_IO PUT OPERATES ON FILES OF MODE OUT_FILE AND IF NO FILE IS SPECIFIED THE CURRENT DEFAULT OUTPUT FILE IS USED" ; <[126 x i8]*> [#uses=1] +@C.131.1559 = internal constant %struct.string___XUB { i32 1, i32 126 } ; <%struct.string___XUB*> [#uses=1] +@.str5 = internal constant [7 x i8] c"CE3806G" ; <[7 x i8]*> [#uses=1] +@C.132.1562 = internal constant %struct.string___XUB { i32 1, i32 7 } ; <%struct.string___XUB*> [#uses=1] +@incompleteF.1176.b = internal global i1 false ; <i1*> [#uses=2] +@incomplete.1177 = internal global %struct.exception { i8 0, i8 65, i32 23, i8* getelementptr ([23 x i8]* @incompleteE.1174, i32 0, i32 0), i8* null, i32 0, i8* null } ; <%struct.exception*> [#uses=15] +@incompleteE.1174 = internal global [23 x i8] c"CE3806G.B_1.INCOMPLETE\00" ; <[23 x i8]*> [#uses=1] +@.str6 = internal constant [0 x i8] zeroinitializer ; <[0 x i8]*> [#uses=1] +@C.136.1568 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@C.137.1571 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@.str7 = internal constant [50 x i8] c"USE_ERROR RAISED ON TEXT CREATE WITH OUT_FILE MODE" ; <[50 x i8]*> [#uses=1] +@C.139.1577 = internal constant %struct.string___XUB { i32 1, i32 50 } ; <%struct.string___XUB*> [#uses=1] +@.str8 = internal constant [14 x i8] c"ce3806g.adb:65" ; <[14 x i8]*> [#uses=1] +@C.140.1580 = internal constant %struct.string___XUB { i32 1, i32 14 } ; <%struct.string___XUB*> [#uses=1] +@.str9 = internal constant [51 x i8] c"NAME_ERROR RAISED ON TEXT CREATE WITH OUT_FILE MODE" ; <[51 x i8]*> [#uses=1] +@C.143.1585 = internal constant %struct.string___XUB { i32 1, i32 51 } ; <%struct.string___XUB*> [#uses=1] +@.str10 = internal constant [14 x i8] c"ce3806g.adb:69" ; <[14 x i8]*> [#uses=1] +@C.144.1588 = internal constant %struct.string___XUB { i32 1, i32 14 } ; <%struct.string___XUB*> [#uses=1] +@C.146.1592 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@C.147.1595 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@C.153.1609 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@C.154.1612 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@.str12 = internal constant [47 x i8] c"USE_ERROR RAISED ON TEXT OPEN WITH IN_FILE MODE" ; <[47 x i8]*> [#uses=1] +@C.156.1618 = internal constant %struct.string___XUB { i32 1, i32 47 } ; <%struct.string___XUB*> [#uses=1] +@.str13 = internal constant [14 x i8] c"ce3806g.adb:88" ; <[14 x i8]*> [#uses=1] +@C.157.1621 = internal constant %struct.string___XUB { i32 1, i32 14 } ; <%struct.string___XUB*> [#uses=1] +@C.159.1627 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@C.160.1630 = internal constant %struct.string___XUB { i32 1, i32 0 } ; <%struct.string___XUB*> [#uses=1] +@.str14 = internal constant [33 x i8] c"VALUE INCORRECT - FIXED FROM FILE" ; <[33 x i8]*> [#uses=1] +@C.162.1637 = internal constant %struct.string___XUB { i32 1, i32 33 } ; <%struct.string___XUB*> [#uses=1] +@.str15 = internal constant [36 x i8] c"VALUE INCORRECT - FIXED FROM DEFAULT" ; <[36 x i8]*> [#uses=1] +@C.164.1642 = internal constant %struct.string___XUB { i32 1, i32 36 } ; <%struct.string___XUB*> [#uses=1] +@ada__io_exceptions__use_error = external global %struct.exception ; <%struct.exception*> [#uses=4] +@ada__io_exceptions__name_error = external global %struct.exception ; <%struct.exception*> [#uses=2] + +define void @_ada_ce3806g() { +entry: + %0 = alloca %struct.system__file_control_block__pstring, align 8 ; <%struct.system__file_control_block__pstring*> [#uses=3] + %1 = alloca %struct.system__file_control_block__pstring, align 8 ; <%struct.system__file_control_block__pstring*> [#uses=3] + %2 = alloca %struct.system__file_control_block__pstring, align 8 ; <%struct.system__file_control_block__pstring*> [#uses=3] + %3 = alloca %struct.system__file_control_block__pstring, align 8 ; <%struct.system__file_control_block__pstring*> [#uses=3] + %FRAME.356 = alloca %struct.FRAME.ce3806g ; <%struct.FRAME.ce3806g*> [#uses=20] + call void @report__test( i8* getelementptr ([7 x i8]* @.str5, i32 0, i32 0), %struct.string___XUB* @C.132.1562, i8* getelementptr ([126 x i8]* @.str4, i32 0, i32 0), %struct.string___XUB* @C.131.1559 ) + %4 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 3 ; <%struct.string___XUB*> [#uses=1] + call void @system__secondary_stack__ss_mark( %struct.string___XUB* noalias sret %4 ) + %.b = load i1* @incompleteF.1176.b ; <i1> [#uses=1] + br i1 %.b, label %bb11, label %bb + +bb: ; preds = %entry + invoke void @system__exception_table__register_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @incomplete.1177 to %struct.system__standard_library__exception_data*) ) + to label %invcont unwind label %lpad + +invcont: ; preds = %bb + store i1 true, i1* @incompleteF.1176.b + br label %bb11 + +bb11: ; preds = %entry, %invcont + %5 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 2 ; <%struct.string___XUB*> [#uses=1] + invoke void @system__secondary_stack__ss_mark( %struct.string___XUB* noalias sret %5 ) + to label %invcont12 unwind label %lpad228 + +invcont12: ; preds = %bb11 + invoke void @report__legal_file_name( %struct.system__file_control_block__pstring* noalias sret %3, i32 1, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.137.1571 ) + to label %invcont17 unwind label %lpad232 + +invcont17: ; preds = %invcont12 + %elt18 = getelementptr %struct.system__file_control_block__pstring* %3, i32 0, i32 0 ; <i8**> [#uses=1] + %val19 = load i8** %elt18, align 8 ; <i8*> [#uses=1] + %elt20 = getelementptr %struct.system__file_control_block__pstring* %3, i32 0, i32 1 ; <%struct.string___XUB**> [#uses=1] + %val21 = load %struct.string___XUB** %elt20 ; <%struct.string___XUB*> [#uses=1] + %6 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__create( %struct.ada__text_io__text_afcb* null, i8 2, i8* %val19, %struct.string___XUB* %val21, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.136.1568 ) + to label %invcont26 unwind label %lpad232 ; <%struct.ada__text_io__text_afcb*> [#uses=2] + +invcont26: ; preds = %invcont17 + %7 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 2, i32 0 ; <i32*> [#uses=1] + %8 = load i32* %7, align 8 ; <i32> [#uses=1] + %9 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 2, i32 1 ; <i32*> [#uses=1] + %10 = load i32* %9, align 4 ; <i32> [#uses=1] + invoke void @system__secondary_stack__ss_release( i32 %8, i32 %10 ) + to label %bb73 unwind label %lpad228 + +bb32: ; preds = %lpad232 + call void @__gnat_begin_handler( i8* %eh_ptr233 ) nounwind + %11 = load void ()** @system__soft_links__abort_undefer, align 4 ; <void ()*> [#uses=1] + invoke void %11( ) + to label %invcont33 unwind label %lpad240 + +invcont33: ; preds = %bb32 + invoke void @report__not_applicable( i8* getelementptr ([50 x i8]* @.str7, i32 0, i32 0), %struct.string___XUB* @C.139.1577 ) + to label %invcont38 unwind label %lpad240 + +invcont38: ; preds = %invcont33 + invoke void @__gnat_raise_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @incomplete.1177 to %struct.system__standard_library__exception_data*), i8* getelementptr ([14 x i8]* @.str8, i32 0, i32 0), %struct.string___XUB* @C.140.1580 ) noreturn + to label %invcont43 unwind label %lpad240 + +invcont43: ; preds = %invcont38 + unreachable + +bb47: ; preds = %ppad291 + call void @__gnat_begin_handler( i8* %eh_ptr233 ) nounwind + %12 = load void ()** @system__soft_links__abort_undefer, align 4 ; <void ()*> [#uses=1] + invoke void %12( ) + to label %invcont49 unwind label %lpad248 + +invcont49: ; preds = %bb47 + invoke void @report__not_applicable( i8* getelementptr ([51 x i8]* @.str9, i32 0, i32 0), %struct.string___XUB* @C.143.1585 ) + to label %invcont54 unwind label %lpad248 + +invcont54: ; preds = %invcont49 + invoke void @__gnat_raise_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @incomplete.1177 to %struct.system__standard_library__exception_data*), i8* getelementptr ([14 x i8]* @.str10, i32 0, i32 0), %struct.string___XUB* @C.144.1588 ) noreturn + to label %invcont59 unwind label %lpad248 + +invcont59: ; preds = %invcont54 + unreachable + +bb73: ; preds = %invcont26 + invoke void @report__legal_file_name( %struct.system__file_control_block__pstring* noalias sret %2, i32 2, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.147.1595 ) + to label %invcont78 unwind label %lpad228 + +invcont78: ; preds = %bb73 + %elt79 = getelementptr %struct.system__file_control_block__pstring* %2, i32 0, i32 0 ; <i8**> [#uses=1] + %val80 = load i8** %elt79, align 8 ; <i8*> [#uses=1] + %elt81 = getelementptr %struct.system__file_control_block__pstring* %2, i32 0, i32 1 ; <%struct.string___XUB**> [#uses=1] + %val82 = load %struct.string___XUB** %elt81 ; <%struct.string___XUB*> [#uses=1] + %13 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__create( %struct.ada__text_io__text_afcb* null, i8 2, i8* %val80, %struct.string___XUB* %val82, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.146.1592 ) + to label %invcont87 unwind label %lpad228 ; <%struct.ada__text_io__text_afcb*> [#uses=2] + +invcont87: ; preds = %invcont78 + invoke void @ada__text_io__set_output( %struct.ada__text_io__text_afcb* %13 ) + to label %invcont88 unwind label %lpad228 + +invcont88: ; preds = %invcont87 + %14 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 1 ; <%struct.string___XUB*> [#uses=1] + invoke void @system__secondary_stack__ss_mark( %struct.string___XUB* noalias sret %14 ) + to label %invcont89 unwind label %lpad228 + +invcont89: ; preds = %invcont88 + invoke fastcc void @ce3806g__fxio__put.1149( %struct.ada__text_io__text_afcb* %6 ) + to label %bb94 unwind label %lpad252 + +bb94: ; preds = %invcont89 + invoke fastcc void @ce3806g__fxio__put__2.1155( ) + to label %invcont95 unwind label %lpad252 + +invcont95: ; preds = %bb94 + %15 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__close( %struct.ada__text_io__text_afcb* %6 ) + to label %invcont96 unwind label %lpad252 ; <%struct.ada__text_io__text_afcb*> [#uses=1] + +invcont96: ; preds = %invcont95 + %16 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 0 ; <%struct.string___XUB*> [#uses=1] + invoke void @system__secondary_stack__ss_mark( %struct.string___XUB* noalias sret %16 ) + to label %invcont97 unwind label %lpad252 + +invcont97: ; preds = %invcont96 + invoke void @report__legal_file_name( %struct.system__file_control_block__pstring* noalias sret %1, i32 1, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.154.1612 ) + to label %invcont102 unwind label %lpad256 + +invcont102: ; preds = %invcont97 + %elt103 = getelementptr %struct.system__file_control_block__pstring* %1, i32 0, i32 0 ; <i8**> [#uses=1] + %val104 = load i8** %elt103, align 8 ; <i8*> [#uses=1] + %elt105 = getelementptr %struct.system__file_control_block__pstring* %1, i32 0, i32 1 ; <%struct.string___XUB**> [#uses=1] + %val106 = load %struct.string___XUB** %elt105 ; <%struct.string___XUB*> [#uses=1] + %17 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__open( %struct.ada__text_io__text_afcb* %15, i8 0, i8* %val104, %struct.string___XUB* %val106, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.153.1609 ) + to label %invcont111 unwind label %lpad256 ; <%struct.ada__text_io__text_afcb*> [#uses=2] + +invcont111: ; preds = %invcont102 + %18 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 0, i32 0 ; <i32*> [#uses=1] + %19 = load i32* %18, align 8 ; <i32> [#uses=1] + %20 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 0, i32 1 ; <i32*> [#uses=1] + %21 = load i32* %20, align 4 ; <i32> [#uses=1] + invoke void @system__secondary_stack__ss_release( i32 %19, i32 %21 ) + to label %bb143 unwind label %lpad252 + +bb117: ; preds = %lpad256 + call void @__gnat_begin_handler( i8* %eh_ptr257 ) nounwind + %22 = load void ()** @system__soft_links__abort_undefer, align 4 ; <void ()*> [#uses=1] + invoke void %22( ) + to label %invcont119 unwind label %lpad264 + +invcont119: ; preds = %bb117 + invoke void @report__not_applicable( i8* getelementptr ([47 x i8]* @.str12, i32 0, i32 0), %struct.string___XUB* @C.156.1618 ) + to label %invcont124 unwind label %lpad264 + +invcont124: ; preds = %invcont119 + invoke void @__gnat_raise_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @incomplete.1177 to %struct.system__standard_library__exception_data*), i8* getelementptr ([14 x i8]* @.str13, i32 0, i32 0), %struct.string___XUB* @C.157.1621 ) noreturn + to label %invcont129 unwind label %lpad264 + +invcont129: ; preds = %invcont124 + unreachable + +bb143: ; preds = %invcont111 + %23 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__standard_output( ) + to label %invcont144 unwind label %lpad252 ; <%struct.ada__text_io__text_afcb*> [#uses=1] + +invcont144: ; preds = %bb143 + invoke void @ada__text_io__set_output( %struct.ada__text_io__text_afcb* %23 ) + to label %invcont145 unwind label %lpad252 + +invcont145: ; preds = %invcont144 + %24 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__close( %struct.ada__text_io__text_afcb* %13 ) + to label %invcont146 unwind label %lpad252 ; <%struct.ada__text_io__text_afcb*> [#uses=1] + +invcont146: ; preds = %invcont145 + invoke void @report__legal_file_name( %struct.system__file_control_block__pstring* noalias sret %0, i32 2, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.160.1630 ) + to label %invcont151 unwind label %lpad252 + +invcont151: ; preds = %invcont146 + %elt152 = getelementptr %struct.system__file_control_block__pstring* %0, i32 0, i32 0 ; <i8**> [#uses=1] + %val153 = load i8** %elt152, align 8 ; <i8*> [#uses=1] + %elt154 = getelementptr %struct.system__file_control_block__pstring* %0, i32 0, i32 1 ; <%struct.string___XUB**> [#uses=1] + %val155 = load %struct.string___XUB** %elt154 ; <%struct.string___XUB*> [#uses=1] + %25 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__open( %struct.ada__text_io__text_afcb* %24, i8 0, i8* %val153, %struct.string___XUB* %val155, i8* getelementptr ([0 x i8]* @.str6, i32 0, i32 0), %struct.string___XUB* @C.159.1627 ) + to label %invcont160 unwind label %lpad252 ; <%struct.ada__text_io__text_afcb*> [#uses=2] + +invcont160: ; preds = %invcont151 + %26 = invoke fastcc i8 @ce3806g__fxio__get.1137( %struct.ada__text_io__text_afcb* %17 ) signext + to label %invcont161 unwind label %lpad252 ; <i8> [#uses=1] + +invcont161: ; preds = %invcont160 + %27 = icmp eq i8 %26, -3 ; <i1> [#uses=1] + br i1 %27, label %bb169, label %bb163 + +bb163: ; preds = %invcont161 + invoke void @report__failed( i8* getelementptr ([33 x i8]* @.str14, i32 0, i32 0), %struct.string___XUB* @C.162.1637 ) + to label %bb169 unwind label %lpad252 + +bb169: ; preds = %invcont161, %bb163 + %28 = invoke fastcc i8 @ce3806g__fxio__get.1137( %struct.ada__text_io__text_afcb* %25 ) signext + to label %invcont170 unwind label %lpad252 ; <i8> [#uses=1] + +invcont170: ; preds = %bb169 + %29 = icmp eq i8 %28, -1 ; <i1> [#uses=1] + br i1 %29, label %bb187, label %bb172 + +bb172: ; preds = %invcont170 + invoke void @report__failed( i8* getelementptr ([36 x i8]* @.str15, i32 0, i32 0), %struct.string___XUB* @C.164.1642 ) + to label %bb187 unwind label %lpad252 + +bb187: ; preds = %invcont170, %bb172 + %30 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 1, i32 0 ; <i32*> [#uses=1] + %31 = load i32* %30, align 8 ; <i32> [#uses=1] + %32 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 1, i32 1 ; <i32*> [#uses=1] + %33 = load i32* %32, align 4 ; <i32> [#uses=1] + invoke void @system__secondary_stack__ss_release( i32 %31, i32 %33 ) + to label %bb193 unwind label %lpad228 + +bb193: ; preds = %bb187 + %34 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__delete( %struct.ada__text_io__text_afcb* %17 ) + to label %invcont194 unwind label %lpad268 ; <%struct.ada__text_io__text_afcb*> [#uses=0] + +invcont194: ; preds = %bb193 + %35 = invoke %struct.ada__text_io__text_afcb* @ada__text_io__delete( %struct.ada__text_io__text_afcb* %25 ) + to label %bb221 unwind label %lpad268 ; <%struct.ada__text_io__text_afcb*> [#uses=0] + +bb196: ; preds = %lpad268 + call void @__gnat_begin_handler( i8* %eh_ptr269 ) nounwind + %36 = load void ()** @system__soft_links__abort_undefer, align 4 ; <void ()*> [#uses=1] + invoke void %36( ) + to label %bb203 unwind label %lpad276 + +bb203: ; preds = %bb196 + invoke void @__gnat_end_handler( i8* %eh_ptr269 ) + to label %bb221 unwind label %lpad272 + +bb205: ; preds = %ppad304 + call void @__gnat_begin_handler( i8* %eh_exception.1 ) nounwind + %37 = load void ()** @system__soft_links__abort_undefer, align 4 ; <void ()*> [#uses=1] + invoke void %37( ) + to label %bb212 unwind label %lpad284 + +bb212: ; preds = %bb205 + invoke void @__gnat_end_handler( i8* %eh_exception.1 ) + to label %bb221 unwind label %lpad280 + +bb221: ; preds = %invcont194, %bb212, %bb203 + %38 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 3, i32 0 ; <i32*> [#uses=1] + %39 = load i32* %38, align 8 ; <i32> [#uses=1] + %40 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 3, i32 1 ; <i32*> [#uses=1] + %41 = load i32* %40, align 4 ; <i32> [#uses=1] + call void @system__secondary_stack__ss_release( i32 %39, i32 %41 ) + call void @report__result( ) + ret void + +lpad: ; preds = %bb + %eh_ptr = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select227 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_all_others_value ) ; <i32> [#uses=0] + br label %ppad + +lpad228: ; preds = %bb187, %ppad294, %invcont88, %invcont87, %invcont78, %bb73, %ppad288, %invcont26, %bb11 + %eh_ptr229 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select231 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr229, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + br label %ppad304 + +lpad232: ; preds = %invcont17, %invcont12 + %eh_ptr233 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=6] + %eh_select235 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr233, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @ada__io_exceptions__use_error, %struct.exception* @ada__io_exceptions__name_error, %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=3] + %eh_typeid = call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @ada__io_exceptions__use_error, i32 0, i32 0) ) ; <i32> [#uses=1] + %42 = icmp eq i32 %eh_select235, %eh_typeid ; <i1> [#uses=1] + br i1 %42, label %bb32, label %ppad291 + +lpad236: ; preds = %lpad240 + %eh_ptr237 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select239 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr237, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + br label %ppad288 + +lpad240: ; preds = %invcont38, %invcont33, %bb32 + %eh_ptr241 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select243 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr241, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + invoke void @__gnat_end_handler( i8* %eh_ptr233 ) + to label %ppad288 unwind label %lpad236 + +lpad244: ; preds = %lpad248 + %eh_ptr245 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select247 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr245, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + br label %ppad288 + +lpad248: ; preds = %invcont54, %invcont49, %bb47 + %eh_ptr249 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select251 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr249, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + invoke void @__gnat_end_handler( i8* %eh_ptr233 ) + to label %ppad288 unwind label %lpad244 + +lpad252: ; preds = %bb94, %invcont89, %invcont160, %bb169, %bb172, %bb163, %invcont151, %invcont146, %invcont145, %invcont144, %bb143, %ppad295, %invcont111, %invcont96, %invcont95 + %eh_ptr253 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select255 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr253, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + br label %ppad294 + +lpad256: ; preds = %invcont102, %invcont97 + %eh_ptr257 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=4] + %eh_select259 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr257, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @ada__io_exceptions__use_error, %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=2] + %eh_typeid297 = call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @ada__io_exceptions__use_error, i32 0, i32 0) ) ; <i32> [#uses=1] + %43 = icmp eq i32 %eh_select259, %eh_typeid297 ; <i1> [#uses=1] + br i1 %43, label %bb117, label %ppad295 + +lpad260: ; preds = %lpad264 + %eh_ptr261 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select263 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr261, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + br label %ppad295 + +lpad264: ; preds = %invcont124, %invcont119, %bb117 + %eh_ptr265 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select267 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr265, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + invoke void @__gnat_end_handler( i8* %eh_ptr257 ) + to label %ppad295 unwind label %lpad260 + +lpad268: ; preds = %invcont194, %bb193 + %eh_ptr269 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=5] + %eh_select271 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr269, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @ada__io_exceptions__use_error, %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=2] + %eh_typeid301 = call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @ada__io_exceptions__use_error, i32 0, i32 0) ) ; <i32> [#uses=1] + %44 = icmp eq i32 %eh_select271, %eh_typeid301 ; <i1> [#uses=1] + br i1 %44, label %bb196, label %ppad304 + +lpad272: ; preds = %bb203, %lpad276 + %eh_ptr273 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select275 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr273, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + br label %ppad304 + +lpad276: ; preds = %bb196 + %eh_ptr277 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select279 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr277, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @incomplete.1177, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + invoke void @__gnat_end_handler( i8* %eh_ptr269 ) + to label %ppad304 unwind label %lpad272 + +lpad280: ; preds = %bb212, %lpad284 + %eh_ptr281 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select283 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr281, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_all_others_value ) ; <i32> [#uses=0] + br label %ppad + +lpad284: ; preds = %bb205 + %eh_ptr285 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select287 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr285, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_all_others_value ) ; <i32> [#uses=0] + invoke void @__gnat_end_handler( i8* %eh_exception.1 ) + to label %ppad unwind label %lpad280 + +ppad: ; preds = %lpad284, %ppad304, %lpad280, %lpad + %eh_exception.2 = phi i8* [ %eh_exception.1, %ppad304 ], [ %eh_ptr281, %lpad280 ], [ %eh_ptr, %lpad ], [ %eh_ptr285, %lpad284 ] ; <i8*> [#uses=1] + %45 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 3, i32 0 ; <i32*> [#uses=1] + %46 = load i32* %45, align 8 ; <i32> [#uses=1] + %47 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 3, i32 1 ; <i32*> [#uses=1] + %48 = load i32* %47, align 4 ; <i32> [#uses=1] + call void @system__secondary_stack__ss_release( i32 %46, i32 %48 ) + %49 = call i32 (...)* @_Unwind_Resume( i8* %eh_exception.2 ) ; <i32> [#uses=0] + unreachable + +ppad288: ; preds = %lpad248, %lpad240, %ppad291, %lpad244, %lpad236 + %eh_exception.0 = phi i8* [ %eh_ptr233, %ppad291 ], [ %eh_ptr245, %lpad244 ], [ %eh_ptr237, %lpad236 ], [ %eh_ptr241, %lpad240 ], [ %eh_ptr249, %lpad248 ] ; <i8*> [#uses=1] + %eh_selector.0 = phi i32 [ %eh_select235, %ppad291 ], [ %eh_select247, %lpad244 ], [ %eh_select239, %lpad236 ], [ %eh_select243, %lpad240 ], [ %eh_select251, %lpad248 ] ; <i32> [#uses=1] + %50 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 2, i32 0 ; <i32*> [#uses=1] + %51 = load i32* %50, align 8 ; <i32> [#uses=1] + %52 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 2, i32 1 ; <i32*> [#uses=1] + %53 = load i32* %52, align 4 ; <i32> [#uses=1] + invoke void @system__secondary_stack__ss_release( i32 %51, i32 %53 ) + to label %ppad304 unwind label %lpad228 + +ppad291: ; preds = %lpad232 + %eh_typeid292 = call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @ada__io_exceptions__name_error, i32 0, i32 0) ) ; <i32> [#uses=1] + %54 = icmp eq i32 %eh_select235, %eh_typeid292 ; <i1> [#uses=1] + br i1 %54, label %bb47, label %ppad288 + +ppad294: ; preds = %ppad295, %lpad252 + %eh_exception.4 = phi i8* [ %eh_ptr253, %lpad252 ], [ %eh_exception.3, %ppad295 ] ; <i8*> [#uses=1] + %eh_selector.4 = phi i32 [ %eh_select255, %lpad252 ], [ %eh_selector.3, %ppad295 ] ; <i32> [#uses=1] + %55 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 1, i32 0 ; <i32*> [#uses=1] + %56 = load i32* %55, align 8 ; <i32> [#uses=1] + %57 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 1, i32 1 ; <i32*> [#uses=1] + %58 = load i32* %57, align 4 ; <i32> [#uses=1] + invoke void @system__secondary_stack__ss_release( i32 %56, i32 %58 ) + to label %ppad304 unwind label %lpad228 + +ppad295: ; preds = %lpad264, %lpad256, %lpad260 + %eh_exception.3 = phi i8* [ %eh_ptr257, %lpad256 ], [ %eh_ptr261, %lpad260 ], [ %eh_ptr265, %lpad264 ] ; <i8*> [#uses=1] + %eh_selector.3 = phi i32 [ %eh_select259, %lpad256 ], [ %eh_select263, %lpad260 ], [ %eh_select267, %lpad264 ] ; <i32> [#uses=1] + %59 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 0, i32 0 ; <i32*> [#uses=1] + %60 = load i32* %59, align 8 ; <i32> [#uses=1] + %61 = getelementptr %struct.FRAME.ce3806g* %FRAME.356, i32 0, i32 0, i32 1 ; <i32*> [#uses=1] + %62 = load i32* %61, align 4 ; <i32> [#uses=1] + invoke void @system__secondary_stack__ss_release( i32 %60, i32 %62 ) + to label %ppad294 unwind label %lpad252 + +ppad304: ; preds = %lpad276, %ppad294, %ppad288, %lpad268, %lpad272, %lpad228 + %eh_exception.1 = phi i8* [ %eh_ptr229, %lpad228 ], [ %eh_ptr269, %lpad268 ], [ %eh_ptr273, %lpad272 ], [ %eh_exception.0, %ppad288 ], [ %eh_exception.4, %ppad294 ], [ %eh_ptr277, %lpad276 ] ; <i8*> [#uses=4] + %eh_selector.1 = phi i32 [ %eh_select231, %lpad228 ], [ %eh_select271, %lpad268 ], [ %eh_select275, %lpad272 ], [ %eh_selector.0, %ppad288 ], [ %eh_selector.4, %ppad294 ], [ %eh_select279, %lpad276 ] ; <i32> [#uses=1] + %eh_typeid305 = call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @incomplete.1177, i32 0, i32 0) ) ; <i32> [#uses=1] + %63 = icmp eq i32 %eh_selector.1, %eh_typeid305 ; <i1> [#uses=1] + br i1 %63, label %bb205, label %ppad +} + +define internal fastcc i8 @ce3806g__fxio__get.1137(%struct.ada__text_io__text_afcb* %file) signext { +entry: + %0 = invoke x86_fp80 @ada__text_io__float_aux__get( %struct.ada__text_io__text_afcb* %file, i32 0 ) + to label %invcont unwind label %lpad ; <x86_fp80> [#uses=5] + +invcont: ; preds = %entry + %1 = fcmp ult x86_fp80 %0, 0xKFFFEFFFFFFFFFFFFFFFF ; <i1> [#uses=1] + %2 = fcmp ugt x86_fp80 %0, 0xK7FFEFFFFFFFFFFFFFFFF ; <i1> [#uses=1] + %or.cond = or i1 %1, %2 ; <i1> [#uses=1] + br i1 %or.cond, label %bb2, label %bb4 + +bb2: ; preds = %invcont + invoke void @__gnat_rcheck_12( i8* getelementptr ([12 x i8]* @.str, i32 0, i32 0), i32 1 ) noreturn + to label %invcont3 unwind label %lpad + +invcont3: ; preds = %bb2 + unreachable + +bb4: ; preds = %invcont + %3 = mul x86_fp80 %0, 0xK40008000000000000000 ; <x86_fp80> [#uses=1] + %4 = fcmp ult x86_fp80 %3, 0xKC0068000000000000000 ; <i1> [#uses=1] + br i1 %4, label %bb8, label %bb6 + +bb6: ; preds = %bb4 + %5 = mul x86_fp80 %0, 0xK40008000000000000000 ; <x86_fp80> [#uses=1] + %6 = fcmp ugt x86_fp80 %5, 0xK4005FE00000000000000 ; <i1> [#uses=1] + br i1 %6, label %bb8, label %bb10 + +bb8: ; preds = %bb4, %bb6 + invoke void @__gnat_rcheck_10( i8* getelementptr ([14 x i8]* @.str1, i32 0, i32 0), i32 324 ) noreturn + to label %invcont9 unwind label %lpad + +invcont9: ; preds = %bb8 + unreachable + +bb10: ; preds = %bb6 + %7 = mul x86_fp80 %0, 0xK40008000000000000000 ; <x86_fp80> [#uses=3] + %8 = fcmp ult x86_fp80 %7, 0xK00000000000000000000 ; <i1> [#uses=1] + br i1 %8, label %bb13, label %bb12 + +bb12: ; preds = %bb10 + %9 = add x86_fp80 %7, 0xK3FFDFFFFFFFFFFFFFFFF ; <x86_fp80> [#uses=1] + br label %bb14 + +bb13: ; preds = %bb10 + %10 = sub x86_fp80 %7, 0xK3FFDFFFFFFFFFFFFFFFF ; <x86_fp80> [#uses=1] + br label %bb14 + +bb14: ; preds = %bb13, %bb12 + %iftmp.339.0.in = phi x86_fp80 [ %10, %bb13 ], [ %9, %bb12 ] ; <x86_fp80> [#uses=1] + %iftmp.339.0 = fptosi x86_fp80 %iftmp.339.0.in to i8 ; <i8> [#uses=3] + %11 = add i8 %iftmp.339.0, 20 ; <i8> [#uses=1] + %12 = icmp ugt i8 %11, 40 ; <i1> [#uses=1] + br i1 %12, label %bb16, label %bb18 + +bb16: ; preds = %bb14 + invoke void @__gnat_rcheck_12( i8* getelementptr ([14 x i8]* @.str1, i32 0, i32 0), i32 324 ) noreturn + to label %invcont17 unwind label %lpad + +invcont17: ; preds = %bb16 + unreachable + +bb18: ; preds = %bb14 + %13 = add i8 %iftmp.339.0, 20 ; <i8> [#uses=1] + %14 = icmp ugt i8 %13, 40 ; <i1> [#uses=1] + br i1 %14, label %bb20, label %bb22 + +bb20: ; preds = %bb18 + invoke void @__gnat_rcheck_12( i8* getelementptr ([14 x i8]* @.str1, i32 0, i32 0), i32 324 ) noreturn + to label %invcont21 unwind label %lpad + +invcont21: ; preds = %bb20 + unreachable + +bb22: ; preds = %bb18 + ret i8 %iftmp.339.0 + +bb23: ; preds = %lpad + call void @__gnat_begin_handler( i8* %eh_ptr ) nounwind + %15 = load void ()** @system__soft_links__abort_undefer, align 4 ; <void ()*> [#uses=1] + invoke void %15( ) + to label %invcont24 unwind label %lpad33 + +invcont24: ; preds = %bb23 + invoke void @__gnat_raise_exception( %struct.system__standard_library__exception_data* bitcast (%struct.exception* @ada__io_exceptions__data_error to %struct.system__standard_library__exception_data*), i8* getelementptr ([47 x i8]* @.str2, i32 0, i32 0), %struct.string___XUB* @C.354.2200 ) noreturn + to label %invcont27 unwind label %lpad33 + +invcont27: ; preds = %invcont24 + unreachable + +lpad: ; preds = %bb20, %bb16, %bb8, %bb2, %entry + %eh_ptr = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=4] + %eh_select32 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), %struct.exception* @constraint_error, i32* @__gnat_all_others_value ) ; <i32> [#uses=1] + %eh_typeid = call i32 @llvm.eh.typeid.for.i32( i8* getelementptr (%struct.exception* @constraint_error, i32 0, i32 0) ) ; <i32> [#uses=1] + %16 = icmp eq i32 %eh_select32, %eh_typeid ; <i1> [#uses=1] + br i1 %16, label %bb23, label %Unwind + +lpad33: ; preds = %invcont24, %bb23 + %eh_ptr34 = call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2] + %eh_select36 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr34, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_all_others_value ) ; <i32> [#uses=0] + call void @__gnat_end_handler( i8* %eh_ptr ) + br label %Unwind + +Unwind: ; preds = %lpad, %lpad33 + %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr34, %lpad33 ] ; <i8*> [#uses=1] + %17 = call i32 (...)* @_Unwind_Resume( i8* %eh_exception.0 ) ; <i32> [#uses=0] + unreachable +} + +define internal fastcc void @ce3806g__fxio__put.1149(%struct.ada__text_io__text_afcb* %file) { +entry: + %A.301 = alloca %struct.string___XUB ; <%struct.string___XUB*> [#uses=3] + %A.292 = alloca %struct.string___XUB ; <%struct.string___XUB*> [#uses=3] + %0 = call i8* @llvm.stacksave( ) |