From 7b495e0c11b7d8833ca3e69513788ac212f4c6f1 Mon Sep 17 00:00:00 2001 From: Peter Schachte Date: Sat, 9 Dec 2023 12:13:29 +1100 Subject: [PATCH] Fix #428 (#429) --- src/Unbranch.hs | 25 +- .../exp/testcase_multi_specz-drone.exp | 4 +- .../execution/semipure_continuation.exp | 1 + test-cases/execution/semipure_continuation.in | 0 .../execution/semipure_continuation.wybe | 19 ++ test-cases/final-dump/afterbreak.exp | 4 +- test-cases/final-dump/alias_fork2.exp | 2 +- test-cases/final-dump/anon_field.exp | 6 +- test-cases/final-dump/backwards_assign.exp | 2 +- test-cases/final-dump/break_in_loop_in_do.exp | 4 +- test-cases/final-dump/bug214.exp | 4 +- test-cases/final-dump/card.exp | 4 +- test-cases/final-dump/caret.exp | 2 +- test-cases/final-dump/det_for.exp | 2 +- test-cases/final-dump/disjunctive-cond.exp | 6 +- test-cases/final-dump/failure_backtrack.exp | 317 ++++++++++++------ test-cases/final-dump/foreign_test.exp | 6 +- test-cases/final-dump/higher_order_loop.exp | 2 +- test-cases/final-dump/higher_order_tests.exp | 14 +- test-cases/final-dump/int_sequence.exp | 2 +- test-cases/final-dump/list_loop.exp | 8 +- test-cases/final-dump/nested_loop.exp | 4 +- test-cases/final-dump/resource_rollback.exp | 2 +- test-cases/final-dump/resource_tmp_vars.exp | 2 +- test-cases/final-dump/simple_loop.exp | 2 +- test-cases/final-dump/stmt_unless.exp | 4 +- test-cases/final-dump/stmt_until.exp | 4 +- test-cases/final-dump/stmt_when.exp | 4 +- test-cases/final-dump/stmt_while.exp | 4 +- test-cases/final-dump/type_generics.exp | 10 +- test-cases/final-dump/unbranch_bug.exp | 6 +- 31 files changed, 306 insertions(+), 170 deletions(-) create mode 100644 test-cases/execution/semipure_continuation.exp create mode 100644 test-cases/execution/semipure_continuation.in create mode 100644 test-cases/execution/semipure_continuation.wybe diff --git a/src/Unbranch.hs b/src/Unbranch.hs index 3bc04b14e..1074c42a7 100644 --- a/src/Unbranch.hs +++ b/src/Unbranch.hs @@ -115,9 +115,10 @@ unbranchProc' proc = do let params' = selectDetism id addTestOutParam detism $ contentApply unbranchParam <$> params let stmts = selectDetism body (body++[move boolTrue testOutExp]) detism + let impurity = procImpurity proc let proto' = proto {procProtoParams = params'} (body',tmpCtr',newProcs) <- - unbranchBody name tmpCtr params' detism stmts + unbranchBody name tmpCtr params' detism impurity stmts let proc' = proc { procProto = proto' , procDetism = selectDetism detism Det detism , procImpln = ProcDefSrc body' @@ -130,10 +131,11 @@ unbranchProc' proc = do -- |Eliminate loops and ensure that Conds only appear as the final -- statement of a body. -unbranchBody :: ProcName -> Int -> [Placed Param] -> Determinism +unbranchBody :: ProcName -> Int -> [Placed Param] -> Determinism -> Impurity -> [Placed Stmt] -> Compiler ([Placed Stmt],Int,[ProcDef]) -unbranchBody name tmpCtr params detism body = do - let unbrancher = initUnbrancherState Nothing tmpCtr detism params name +unbranchBody name tmpCtr params detism impurity body = do + let unbrancher = + initUnbrancherState Nothing tmpCtr detism impurity params name let outparams = brOutParams unbrancher let outvars = brOutArgs unbrancher let stmts = body @@ -219,6 +221,7 @@ data UnbrancherState = Unbrancher { -- the current SemiDet context (and so must be -- saved if they are reassigned) brDetism :: Determinism, -- ^The determinism of the current context + brImpurity :: Impurity, -- ^The impurity of the enclosing proc brAlternate :: [Placed Stmt], -- ^Code to execute in case of failure brSense :: Bool, -- ^True iff execute brAlternate on failure brProcName :: ProcName -- ^The name of the proc being unbranched @@ -231,9 +234,9 @@ data LoopInfo = LoopInfo { } deriving (Eq) -initUnbrancherState :: Maybe LoopInfo -> Int -> Determinism -> [Placed Param] - -> ProcName -> UnbrancherState -initUnbrancherState loopinfo tmpCtr detism params = +initUnbrancherState :: Maybe LoopInfo -> Int -> Determinism -> Impurity + -> [Placed Param] -> ProcName -> UnbrancherState +initUnbrancherState loopinfo tmpCtr detism impurity params = let defined = inputParams $ content <$> params outParams = [unbranchParam (Param nm ty ParamOut ft) `maybePlace` pos | (Param nm ty fl ft, pos) <- unPlace <$> params @@ -246,7 +249,8 @@ initUnbrancherState loopinfo tmpCtr detism params = , flowsOut fl && flowsIn fl] alt = selectDetism [] [move boolFalse testOutExp] detism in Unbrancher loopinfo defined tmpCtr outParams outArgs - (Set.fromList inOuts) [] Map.empty Set.empty detism alt True + (Set.fromList inOuts) [] Map.empty Set.empty detism impurity + alt True -- | Add the specified variable to the symbol table @@ -308,14 +312,15 @@ newProcName name = lift . genProcName . (`specialName2` name) =<< gets brProcNam -- |Create, unbranch, and record a new proc with the specified proto, --- determinism and body. +-- determinism and body. Takes its impurity from the parent proc. genProc :: ProcProto -> Determinism -> [Placed Stmt] -> Unbrancher () genProc proto detism stmts = do let name = procProtoName proto tmpCtr <- gets brTempCtr + impurity <- gets brImpurity -- call site count will be refilled later let procDef = ProcDef name proto (ProcDefSrc stmts) Nothing tmpCtr 0 - Map.empty Private detism MayInline Pure GeneratedProc + Map.empty Private detism MayInline impurity GeneratedProc NoSuperproc Map.empty logUnbranch $ "Generating fresh " ++ show detism ++ " proc:" ++ showProcDef 8 procDef diff --git a/test-cases/complex/exp/testcase_multi_specz-drone.exp b/test-cases/complex/exp/testcase_multi_specz-drone.exp index 53ef4fcf7..e37f74eb7 100644 --- a/test-cases/complex/exp/testcase_multi_specz-drone.exp +++ b/test-cases/complex/exp/testcase_multi_specz-drone.exp @@ -232,7 +232,7 @@ module top-level code > public {semipure} (0 calls) -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: drone.#cont#1<0> #cont#1()<{<>}; {<>}; {}>: AliasPairs: [] @@ -888,7 +888,7 @@ module top-level code > public {semipure} (0 calls) -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: drone.#cont#1<0> #cont#1()<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/execution/semipure_continuation.exp b/test-cases/execution/semipure_continuation.exp new file mode 100644 index 000000000..3ae0b938f --- /dev/null +++ b/test-cases/execution/semipure_continuation.exp @@ -0,0 +1 @@ +321 diff --git a/test-cases/execution/semipure_continuation.in b/test-cases/execution/semipure_continuation.in new file mode 100644 index 000000000..e69de29bb diff --git a/test-cases/execution/semipure_continuation.wybe b/test-cases/execution/semipure_continuation.wybe new file mode 100644 index 000000000..8559a20f9 --- /dev/null +++ b/test-cases/execution/semipure_continuation.wybe @@ -0,0 +1,19 @@ +use logging +def {noinline} do_nothing { + pass +} + +def {semipure} foo(x:int) { + if { + x ~= 0 :: + do_nothing + } + if { + x ~= 0 :: + !logmsg(x) + !foo(x-1) + } +} + +!foo(3) +!lognl diff --git a/test-cases/final-dump/afterbreak.exp b/test-cases/final-dump/afterbreak.exp index 85bc6f9a1..6da4f08cd 100644 --- a/test-cases/final-dump/afterbreak.exp +++ b/test-cases/final-dump/afterbreak.exp @@ -17,7 +17,7 @@ module top-level code > public {inline,semipure} (0 calls) afterbreak.#cont#1<0>(1:wybe.int)<{<>}; {<>}; {}> #0 @afterbreak:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: afterbreak.#cont#1<0> #cont#1(x##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] @@ -36,7 +36,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > {inline} (1 calls) +proc #cont#2 > {inline,semipure} (1 calls) 0: afterbreak.#cont#2<0> #cont#2([x##0:wybe.int], y##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/alias_fork2.exp b/test-cases/final-dump/alias_fork2.exp index 8910494d1..b7857dc3a 100644 --- a/test-cases/final-dump/alias_fork2.exp +++ b/test-cases/final-dump/alias_fork2.exp @@ -46,7 +46,7 @@ module top-level code > public {semipure} (0 calls) -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: alias_fork2.#cont#1<0> #cont#1(t##0:mytree.tree, t1##0:mytree.tree)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/anon_field.exp b/test-cases/final-dump/anon_field.exp index 1761722d9..716b6bd84 100644 --- a/test-cases/final-dump/anon_field.exp +++ b/test-cases/final-dump/anon_field.exp @@ -45,7 +45,7 @@ module top-level code > public {semipure} (0 calls) -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: anon_field.#cont#1<0> #cont#1()<{<>}; {<>}; {}>: AliasPairs: [] @@ -69,7 +69,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > (3 calls) +proc #cont#2 > {semipure} (3 calls) 0: anon_field.#cont#2<0> #cont#2()<{<>}; {<>}; {}>: AliasPairs: [] @@ -96,7 +96,7 @@ proc #cont#2 > (3 calls) -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: anon_field.#cont#3<0> #cont#3()<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/backwards_assign.exp b/test-cases/final-dump/backwards_assign.exp index 5c4c90e34..96778300d 100644 --- a/test-cases/final-dump/backwards_assign.exp +++ b/test-cases/final-dump/backwards_assign.exp @@ -17,7 +17,7 @@ module top-level code > public {inline,semipure} (0 calls) backwards_assign.#cont#1<0>(0:wybe.int)<{<>}; {<>}; {}> #0 @backwards_assign:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: backwards_assign.#cont#1<0> #cont#1(i##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/break_in_loop_in_do.exp b/test-cases/final-dump/break_in_loop_in_do.exp index 531d4a878..7155c51c1 100644 --- a/test-cases/final-dump/break_in_loop_in_do.exp +++ b/test-cases/final-dump/break_in_loop_in_do.exp @@ -21,7 +21,7 @@ module top-level code > public {semipure} (0 calls) foreign lpvm store(~%tmp#7##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn -proc #cont#1 > {inline} (2 calls) +proc #cont#1 > {inline,semipure} (2 calls) 0: break_in_loop_in_do.#cont#1<0> #cont#1([counter##0:wybe.int])<{<>, <>}; {<>}; {}>: AliasPairs: [] @@ -33,7 +33,7 @@ proc #cont#1 > {inline} (2 calls) foreign lpvm store(~%tmp#8##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn -proc #cont#2 > {inline} (1 calls) +proc #cont#2 > {inline,semipure} (1 calls) 0: break_in_loop_in_do.#cont#2<0> #cont#2([tmp#0##0:wybe.int], tmp#1##0:wybe.int)<{<>}; {<>, <>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/bug214.exp b/test-cases/final-dump/bug214.exp index 1da4944ae..e9a631d74 100644 --- a/test-cases/final-dump/bug214.exp +++ b/test-cases/final-dump/bug214.exp @@ -28,7 +28,7 @@ module top-level code > public {semipure} (0 calls) bug214.#cont#2<0>[7477e50a09](~tmp#0##0:bug214.position, ~tmp#1##0:bug214)<{<>}; {<>}; {}> #3 @bug214:nn:nn -proc #cont#1 > {inline} (0 calls) +proc #cont#1 > {inline,semipure} (0 calls) 0: bug214.#cont#1<0> #cont#1(pos##0:bug214.position, sub##0:bug214)<{<>}; {<>}; {}>: AliasPairs: [] @@ -56,7 +56,7 @@ proc #cont#1 > {inline} (0 calls) foreign lpvm store(~%tmp#38##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn -proc #cont#2 > (3 calls) +proc #cont#2 > {semipure} (3 calls) 0: bug214.#cont#2<0>[7477e50a09] #cont#2(pos##0:bug214.position, sub##0:bug214)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/card.exp b/test-cases/final-dump/card.exp index a3cad5af2..5d7d99d06 100644 --- a/test-cases/final-dump/card.exp +++ b/test-cases/final-dump/card.exp @@ -58,7 +58,7 @@ module top-level code > public {inline,semipure} (0 calls) card.#cont#1<0>(~tmp#1##0:wybe.list(card.suit))<{<>}; {<>}; {}> #1 @card:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: card.#cont#1<0> #cont#1(tmp#0##0:wybe.list(card.suit))<{<>}; {<>}; {}>: AliasPairs: [] @@ -75,7 +75,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > (2 calls) +proc #cont#2 > {semipure} (2 calls) 0: card.#cont#2<0> #cont#2(s##0:card.suit, tmp#0##0:wybe.list(card.suit), tmp#2##0:wybe.list(card.rank))<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/caret.exp b/test-cases/final-dump/caret.exp index 1f3dcff70..3c77ed4f9 100644 --- a/test-cases/final-dump/caret.exp +++ b/test-cases/final-dump/caret.exp @@ -37,7 +37,7 @@ module top-level code > public {semipure} (0 calls) caret.#cont#1<0>[410bae77d3](~tmp#27##0:caret.region)<{<>}; {<>}; {}> #8 -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: caret.#cont#1<0>[410bae77d3] #cont#1(reg##0:caret.region)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/det_for.exp b/test-cases/final-dump/det_for.exp index b77a967cc..771ce2f01 100644 --- a/test-cases/final-dump/det_for.exp +++ b/test-cases/final-dump/det_for.exp @@ -17,7 +17,7 @@ module top-level code > public {inline,semipure} (0 calls) det_for.#cont#1<0>(0:wybe.int)<{<>}; {<>}; {}> #0 @det_for:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: det_for.#cont#1<0> #cont#1(tmp#0##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/disjunctive-cond.exp b/test-cases/final-dump/disjunctive-cond.exp index 6f4b15644..77dea4054 100644 --- a/test-cases/final-dump/disjunctive-cond.exp +++ b/test-cases/final-dump/disjunctive-cond.exp @@ -21,7 +21,7 @@ module top-level code > public {semipure} (0 calls) disjunctive-cond.#cont#1<0>(1:wybe.bool, 0:wybe.bool)<{<>}; {<>}; {}> #9 -proc #cont#1 > (5 calls) +proc #cont#1 > {semipure} (5 calls) 0: disjunctive-cond.#cont#1<0> #cont#1(a##0:wybe.bool, b##0:wybe.bool)<{<>}; {<>}; {}>: AliasPairs: [] @@ -53,7 +53,7 @@ proc #cont#1 > (5 calls) -proc #cont#2 > (3 calls) +proc #cont#2 > {semipure} (3 calls) 0: disjunctive-cond.#cont#2<0> #cont#2(a##0:wybe.bool, b##0:wybe.bool)<{<>}; {<>}; {}>: AliasPairs: [] @@ -88,7 +88,7 @@ proc #cont#2 > (3 calls) -proc #cont#3 > (7 calls) +proc #cont#3 > {semipure} (7 calls) 0: disjunctive-cond.#cont#3<0> #cont#3(a##0:wybe.bool, b##0:wybe.bool)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/failure_backtrack.exp b/test-cases/final-dump/failure_backtrack.exp index dd7e76fa8..d3007d6a0 100644 --- a/test-cases/final-dump/failure_backtrack.exp +++ b/test-cases/final-dump/failure_backtrack.exp @@ -41,24 +41,28 @@ module top-level code > public {semipure} (0 calls) failure_backtrack.#cont#1<0>(~tmp#143##0:wybe.int, ~tmp#144##0:wybe.int, 42:wybe.int, 21:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}> #23 -proc #cont#1 > (3 calls) +proc #cont#1 > {semipure} (3 calls) 0: failure_backtrack.#cont#1<0> #cont#1(tmp#143##0:wybe.int, tmp#144##0:wybe.int, x##0:wybe.int, y##0:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}>: AliasPairs: [] InterestingCallProperties: [] - MultiSpeczDepInfo: [(24,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] - wybe.int.fmt<0>(x##0:wybe.int, ?tmp#17##0:wybe.string) #0 @failure_backtrack:nn:nn + MultiSpeczDepInfo: [(22,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(23,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(24,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#12##0:wybe.string) #0 @failure_backtrack:nn:nn foreign lpvm load(<>:wybe.int, ?%r##0:wybe.int) @failure_backtrack:nn:nn - wybe.int.fmt<0>(r##0:wybe.int, ?tmp#19##0:wybe.string) #1 @failure_backtrack:nn:nn - wybe.string.,,<0>(", r = ":wybe.string, ~tmp#19##0:wybe.string, ?tmp#18##0:wybe.string) #2 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#17##0:wybe.string, ~tmp#18##0:wybe.string, ?tmp#11##0:wybe.string) #3 @failure_backtrack:nn:nn - wybe.string.,,<0>("after conditional; x = ":wybe.string, tmp#11##0:wybe.string, ?tmp#10##0:wybe.string) #4 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#10##0:wybe.string)<{<>}; {<>}; {}> #22 @string:nn:nn + wybe.int.fmt<0>(r##0:wybe.int, ?tmp#14##0:wybe.string) #1 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#14##0:wybe.string, ?tmp#13##0:wybe.string) #2 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#12##0:wybe.string, ~tmp#13##0:wybe.string, ?tmp#11##0:wybe.string) #3 @failure_backtrack:nn:nn + wybe.string.,,<0>("after conditional; x = ":wybe.string, ~tmp#11##0:wybe.string, ?tmp#10##0:wybe.string) #4 @failure_backtrack:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#10##0:wybe.string)<{<>}; {<>}; {}> #22 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#171##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#171##0:wybe.phantom, ?tmp#172##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#172##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn - wybe.string.,,<0>("before second conditional: x = ":wybe.string, tmp#11##0:wybe.string, ?tmp#15##0:wybe.string) #10 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#15##0:wybe.string)<{<>}; {<>}; {}> #23 @string:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#17##0:wybe.string) #6 @failure_backtrack:nn:nn + wybe.int.fmt<0>(r##0:wybe.int, ?tmp#19##0:wybe.string) #7 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#19##0:wybe.string, ?tmp#18##0:wybe.string) #8 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#17##0:wybe.string, ~tmp#18##0:wybe.string, ?tmp#16##0:wybe.string) #9 @failure_backtrack:nn:nn + wybe.string.,,<0>("before second conditional: x = ":wybe.string, ~tmp#16##0:wybe.string, ?tmp#15##0:wybe.string) #10 @failure_backtrack:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#15##0:wybe.string)<{<>}; {<>}; {}> #23 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#174##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#174##0:wybe.phantom, ?tmp#147##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#147##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn @@ -66,8 +70,12 @@ proc #cont#1 > (3 calls) failure_backtrack.nope2<0>(?x##1:wybe.int, ?tmp#169##0:wybe.bool) #12 @failure_backtrack:nn:nn case ~tmp#169##0:wybe.bool of 0: - foreign lpvm store(~r##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn - wybe.string.,,<0>("nope2 fails; x = ":wybe.string, ~tmp#11##0:wybe.string, ?tmp#20##0:wybe.string) #19 @failure_backtrack:nn:nn + foreign lpvm store(r##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#22##0:wybe.string) #15 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~r##0:wybe.int, ?tmp#24##0:wybe.string) #16 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#24##0:wybe.string, ?tmp#23##0:wybe.string) #17 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#22##0:wybe.string, ~tmp#23##0:wybe.string, ?tmp#21##0:wybe.string) #18 @failure_backtrack:nn:nn + wybe.string.,,<0>("nope2 fails; x = ":wybe.string, ~tmp#21##0:wybe.string, ?tmp#20##0:wybe.string) #19 @failure_backtrack:nn:nn wybe.string.print<0>[410bae77d3](~tmp#20##0:wybe.string)<{<>}; {<>}; {}> #24 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#177##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#177##0:wybe.phantom, ?tmp#178##0:wybe.phantom) @io:nn:nn @@ -83,31 +91,39 @@ proc #cont#1 > (3 calls) -proc #cont#2 > (2 calls) +proc #cont#2 > {semipure} (2 calls) 0: failure_backtrack.#cont#2<0> #cont#2(tmp#143##0:wybe.int, tmp#144##0:wybe.int, x##0:wybe.int, y##0:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}>: AliasPairs: [] InterestingCallProperties: [] - MultiSpeczDepInfo: [(24,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] - wybe.int.fmt<0>(x##0:wybe.int, ?tmp#32##0:wybe.string) #0 @failure_backtrack:nn:nn - foreign lpvm load(<>:wybe.int, ?%tmp#148##0:wybe.int) @failure_backtrack:nn:nn - wybe.int.fmt<0>(~tmp#148##0:wybe.int, ?tmp#34##0:wybe.string) #1 @failure_backtrack:nn:nn - wybe.string.,,<0>(", r = ":wybe.string, ~tmp#34##0:wybe.string, ?tmp#33##0:wybe.string) #2 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#32##0:wybe.string, ~tmp#33##0:wybe.string, ?tmp#26##0:wybe.string) #3 @failure_backtrack:nn:nn - wybe.string.,,<0>("after second conditional; x = ":wybe.string, tmp#26##0:wybe.string, ?tmp#25##0:wybe.string) #4 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#25##0:wybe.string)<{<>}; {<>}; {}> #22 @string:nn:nn + MultiSpeczDepInfo: [(22,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(23,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(24,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#27##0:wybe.string) #0 @failure_backtrack:nn:nn + foreign lpvm load(<>:wybe.int, ?%r##0:wybe.int) @failure_backtrack:nn:nn + wybe.int.fmt<0>(r##0:wybe.int, ?tmp#29##0:wybe.string) #1 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#29##0:wybe.string, ?tmp#28##0:wybe.string) #2 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#27##0:wybe.string, ~tmp#28##0:wybe.string, ?tmp#26##0:wybe.string) #3 @failure_backtrack:nn:nn + wybe.string.,,<0>("after second conditional; x = ":wybe.string, ~tmp#26##0:wybe.string, ?tmp#25##0:wybe.string) #4 @failure_backtrack:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#25##0:wybe.string)<{<>}; {<>}; {}> #22 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#170##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#170##0:wybe.phantom, ?tmp#171##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#171##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn - wybe.string.,,<0>("before third conditional: x = ":wybe.string, tmp#26##0:wybe.string, ?tmp#30##0:wybe.string) #10 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#30##0:wybe.string)<{<>}; {<>}; {}> #23 @string:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#32##0:wybe.string) #6 @failure_backtrack:nn:nn + wybe.int.fmt<0>(r##0:wybe.int, ?tmp#34##0:wybe.string) #7 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#34##0:wybe.string, ?tmp#33##0:wybe.string) #8 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#32##0:wybe.string, ~tmp#33##0:wybe.string, ?tmp#31##0:wybe.string) #9 @failure_backtrack:nn:nn + wybe.string.,,<0>("before third conditional: x = ":wybe.string, ~tmp#31##0:wybe.string, ?tmp#30##0:wybe.string) #10 @failure_backtrack:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#30##0:wybe.string)<{<>}; {<>}; {}> #23 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#173##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#173##0:wybe.phantom, ?tmp#150##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#150##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn failure_backtrack.nope2<0>(?r##3:wybe.int, ?tmp#168##0:wybe.bool) #12 @failure_backtrack:nn:nn case ~tmp#168##0:wybe.bool of 0: - wybe.string.,,<0>("nope2 fails; x = ":wybe.string, ~tmp#26##0:wybe.string, ?tmp#35##0:wybe.string) #19 @failure_backtrack:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#37##0:wybe.string) #15 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~r##0:wybe.int, ?tmp#39##0:wybe.string) #16 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#39##0:wybe.string, ?tmp#38##0:wybe.string) #17 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#37##0:wybe.string, ~tmp#38##0:wybe.string, ?tmp#36##0:wybe.string) #18 @failure_backtrack:nn:nn + wybe.string.,,<0>("nope2 fails; x = ":wybe.string, ~tmp#36##0:wybe.string, ?tmp#35##0:wybe.string) #19 @failure_backtrack:nn:nn wybe.string.print<0>[410bae77d3](~tmp#35##0:wybe.string)<{<>}; {<>}; {}> #24 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#176##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#176##0:wybe.phantom, ?tmp#177##0:wybe.phantom) @io:nn:nn @@ -124,33 +140,35 @@ proc #cont#2 > (2 calls) -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: failure_backtrack.#cont#3<0> #cont#3(tmp#143##0:wybe.int, tmp#144##0:wybe.int, x##0:wybe.int, y##0:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}>: AliasPairs: [] InterestingCallProperties: [] - MultiSpeczDepInfo: [(50,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(51,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] + MultiSpeczDepInfo: [(48,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(49,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(50,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(51,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] wybe.int.fmt<0>(x##0:wybe.int, ?tmp#42##0:wybe.string) #0 @failure_backtrack:nn:nn foreign lpvm load(<>:wybe.int, ?%r##0:wybe.int) @failure_backtrack:nn:nn wybe.int.fmt<0>(r##0:wybe.int, ?tmp#44##0:wybe.string) #1 @failure_backtrack:nn:nn - wybe.string.,,<0>(", r = ":wybe.string, tmp#44##0:wybe.string, ?tmp#43##0:wybe.string) #2 @failure_backtrack:nn:nn - wybe.string.,,<0>(tmp#42##0:wybe.string, ~tmp#43##0:wybe.string, ?tmp#41##0:wybe.string) #3 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#44##0:wybe.string, ?tmp#43##0:wybe.string) #2 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#42##0:wybe.string, ~tmp#43##0:wybe.string, ?tmp#41##0:wybe.string) #3 @failure_backtrack:nn:nn wybe.string.,,<0>("after third conditional; x = ":wybe.string, ~tmp#41##0:wybe.string, ?tmp#40##0:wybe.string) #4 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#40##0:wybe.string)<{<>}; {<>}; {}> #48 @string:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#40##0:wybe.string)<{<>}; {<>}; {}> #48 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#169##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#169##0:wybe.phantom, ?tmp#170##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#170##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#47##0:wybe.string) #6 @failure_backtrack:nn:nn wybe.int.fmt<0>(y##0:wybe.int, ?tmp#50##0:wybe.string) #7 @failure_backtrack:nn:nn + wybe.int.fmt<0>(r##0:wybe.int, ?tmp#53##0:wybe.string) #8 @failure_backtrack:nn:nn foreign lpvm load(<>:wybe.int, ?%s##0:wybe.int) @failure_backtrack:nn:nn wybe.int.fmt<0>(s##0:wybe.int, ?tmp#55##0:wybe.string) #9 @failure_backtrack:nn:nn wybe.string.,,<0>(", s = ":wybe.string, ~tmp#55##0:wybe.string, ?tmp#54##0:wybe.string) #10 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#44##0:wybe.string, ~tmp#54##0:wybe.string, ?tmp#52##0:wybe.string) #11 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#53##0:wybe.string, ~tmp#54##0:wybe.string, ?tmp#52##0:wybe.string) #11 @failure_backtrack:nn:nn wybe.string.,,<0>(", r = ":wybe.string, ~tmp#52##0:wybe.string, ?tmp#51##0:wybe.string) #12 @failure_backtrack:nn:nn wybe.string.,,<0>(~tmp#50##0:wybe.string, ~tmp#51##0:wybe.string, ?tmp#49##0:wybe.string) #13 @failure_backtrack:nn:nn wybe.string.,,<0>(", y = ":wybe.string, ~tmp#49##0:wybe.string, ?tmp#48##0:wybe.string) #14 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#42##0:wybe.string, ~tmp#48##0:wybe.string, ?tmp#46##0:wybe.string) #15 @failure_backtrack:nn:nn - wybe.string.,,<0>("before fourth conditional: x = ":wybe.string, tmp#46##0:wybe.string, ?tmp#45##0:wybe.string) #16 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#45##0:wybe.string)<{<>}; {<>}; {}> #49 @string:nn:nn + wybe.string.,,<0>(~tmp#47##0:wybe.string, ~tmp#48##0:wybe.string, ?tmp#46##0:wybe.string) #15 @failure_backtrack:nn:nn + wybe.string.,,<0>("before fourth conditional: x = ":wybe.string, ~tmp#46##0:wybe.string, ?tmp#45##0:wybe.string) #16 @failure_backtrack:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#45##0:wybe.string)<{<>}; {<>}; {}> #49 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#172##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#172##0:wybe.phantom, ?tmp#153##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#153##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn @@ -158,8 +176,18 @@ proc #cont#3 > (2 calls) failure_backtrack.yup<0>(?tmp#166##0:wybe.bool) #18 @failure_backtrack:nn:nn case ~tmp#166##0:wybe.bool of 0: - foreign lpvm store(~r##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn - wybe.string.,,<0>("nope fails; x = ":wybe.string, ~tmp#46##0:wybe.string, ?tmp#56##0:wybe.string) #45 @failure_backtrack:nn:nn + foreign lpvm store(r##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#58##0:wybe.string) #35 @failure_backtrack:nn:nn + wybe.int.fmt<0>(y##0:wybe.int, ?tmp#61##0:wybe.string) #36 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~r##0:wybe.int, ?tmp#64##0:wybe.string) #37 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~s##0:wybe.int, ?tmp#66##0:wybe.string) #38 @failure_backtrack:nn:nn + wybe.string.,,<0>(", s = ":wybe.string, ~tmp#66##0:wybe.string, ?tmp#65##0:wybe.string) #39 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#64##0:wybe.string, ~tmp#65##0:wybe.string, ?tmp#63##0:wybe.string) #40 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#63##0:wybe.string, ?tmp#62##0:wybe.string) #41 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#61##0:wybe.string, ~tmp#62##0:wybe.string, ?tmp#60##0:wybe.string) #42 @failure_backtrack:nn:nn + wybe.string.,,<0>(", y = ":wybe.string, ~tmp#60##0:wybe.string, ?tmp#59##0:wybe.string) #43 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#58##0:wybe.string, ~tmp#59##0:wybe.string, ?tmp#57##0:wybe.string) #44 @failure_backtrack:nn:nn + wybe.string.,,<0>("nope fails; x = ":wybe.string, ~tmp#57##0:wybe.string, ?tmp#56##0:wybe.string) #45 @failure_backtrack:nn:nn wybe.string.print<0>[410bae77d3](~tmp#56##0:wybe.string)<{<>}; {<>}; {}> #50 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#175##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#175##0:wybe.phantom, ?tmp#176##0:wybe.phantom) @io:nn:nn @@ -171,9 +199,19 @@ proc #cont#3 > (2 calls) failure_backtrack.nope<0>(?tmp#167##0:wybe.bool) #19 @failure_backtrack:nn:nn case ~tmp#167##0:wybe.bool of 0: - foreign lpvm store(~r##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn - foreign lpvm store(~s##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn - wybe.string.,,<0>("nope fails; x = ":wybe.string, ~tmp#46##0:wybe.string, ?tmp#56##0:wybe.string) #32 @failure_backtrack:nn:nn + foreign lpvm store(r##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn + foreign lpvm store(s##0:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#58##0:wybe.string) #22 @failure_backtrack:nn:nn + wybe.int.fmt<0>(y##0:wybe.int, ?tmp#61##0:wybe.string) #23 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~r##0:wybe.int, ?tmp#64##0:wybe.string) #24 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~s##0:wybe.int, ?tmp#66##0:wybe.string) #25 @failure_backtrack:nn:nn + wybe.string.,,<0>(", s = ":wybe.string, ~tmp#66##0:wybe.string, ?tmp#65##0:wybe.string) #26 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#64##0:wybe.string, ~tmp#65##0:wybe.string, ?tmp#63##0:wybe.string) #27 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#63##0:wybe.string, ?tmp#62##0:wybe.string) #28 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#61##0:wybe.string, ~tmp#62##0:wybe.string, ?tmp#60##0:wybe.string) #29 @failure_backtrack:nn:nn + wybe.string.,,<0>(", y = ":wybe.string, ~tmp#60##0:wybe.string, ?tmp#59##0:wybe.string) #30 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#58##0:wybe.string, ~tmp#59##0:wybe.string, ?tmp#57##0:wybe.string) #31 @failure_backtrack:nn:nn + wybe.string.,,<0>("nope fails; x = ":wybe.string, ~tmp#57##0:wybe.string, ?tmp#56##0:wybe.string) #32 @failure_backtrack:nn:nn wybe.string.print<0>[410bae77d3](~tmp#56##0:wybe.string)<{<>}; {<>}; {}> #51 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#178##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#178##0:wybe.phantom, ?tmp#179##0:wybe.phantom) @io:nn:nn @@ -190,30 +228,40 @@ proc #cont#3 > (2 calls) -proc #cont#4 > (3 calls) +proc #cont#4 > {semipure} (3 calls) 0: failure_backtrack.#cont#4<0> #cont#4(tmp#143##0:wybe.int, tmp#144##0:wybe.int, x##0:wybe.int, y##0:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}>: AliasPairs: [] InterestingCallProperties: [] - MultiSpeczDepInfo: [(28,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] - wybe.int.fmt<0>(~x##0:wybe.int, ?tmp#80##0:wybe.string) #0 @failure_backtrack:nn:nn - wybe.int.fmt<0>(y##0:wybe.int, ?tmp#83##0:wybe.string) #1 @failure_backtrack:nn:nn + MultiSpeczDepInfo: [(27,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []])),(28,(wybe.string.print<0>,fromList [NonAliasedParamCond 0 []]))] + wybe.int.fmt<0>(x##0:wybe.int, ?tmp#69##0:wybe.string) #0 @failure_backtrack:nn:nn + wybe.int.fmt<0>(y##0:wybe.int, ?tmp#72##0:wybe.string) #1 @failure_backtrack:nn:nn foreign lpvm load(<>:wybe.int, ?%tmp#131##0:wybe.int) @failure_backtrack:nn:nn - wybe.int.fmt<0>(~tmp#131##0:wybe.int, ?tmp#86##0:wybe.string) #2 @failure_backtrack:nn:nn + wybe.int.fmt<0>(tmp#131##0:wybe.int, ?tmp#75##0:wybe.string) #2 @failure_backtrack:nn:nn foreign lpvm load(<>:wybe.int, ?%s##0:wybe.int) @failure_backtrack:nn:nn - wybe.int.fmt<0>(s##0:wybe.int, ?tmp#88##0:wybe.string) #3 @failure_backtrack:nn:nn - wybe.string.,,<0>(", s = ":wybe.string, ~tmp#88##0:wybe.string, ?tmp#87##0:wybe.string) #4 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#86##0:wybe.string, ~tmp#87##0:wybe.string, ?tmp#85##0:wybe.string) #5 @failure_backtrack:nn:nn - wybe.string.,,<0>(", r = ":wybe.string, ~tmp#85##0:wybe.string, ?tmp#84##0:wybe.string) #6 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#83##0:wybe.string, ~tmp#84##0:wybe.string, ?tmp#82##0:wybe.string) #7 @failure_backtrack:nn:nn - wybe.string.,,<0>(", y = ":wybe.string, ~tmp#82##0:wybe.string, ?tmp#81##0:wybe.string) #8 @failure_backtrack:nn:nn - wybe.string.,,<0>(~tmp#80##0:wybe.string, ~tmp#81##0:wybe.string, ?tmp#68##0:wybe.string) #9 @failure_backtrack:nn:nn - wybe.string.,,<0>("after fourth conditional; x = ":wybe.string, tmp#68##0:wybe.string, ?tmp#67##0:wybe.string) #10 @failure_backtrack:nn:nn - wybe.string.print<0>(~tmp#67##0:wybe.string)<{<>}; {<>}; {}> #27 @string:nn:nn + wybe.int.fmt<0>(s##0:wybe.int, ?tmp#77##0:wybe.string) #3 @failure_backtrack:nn:nn + wybe.string.,,<0>(", s = ":wybe.string, ~tmp#77##0:wybe.string, ?tmp#76##0:wybe.string) #4 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#75##0:wybe.string, ~tmp#76##0:wybe.string, ?tmp#74##0:wybe.string) #5 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#74##0:wybe.string, ?tmp#73##0:wybe.string) #6 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#72##0:wybe.string, ~tmp#73##0:wybe.string, ?tmp#71##0:wybe.string) #7 @failure_backtrack:nn:nn + wybe.string.,,<0>(", y = ":wybe.string, ~tmp#71##0:wybe.string, ?tmp#70##0:wybe.string) #8 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#69##0:wybe.string, ~tmp#70##0:wybe.string, ?tmp#68##0:wybe.string) #9 @failure_backtrack:nn:nn + wybe.string.,,<0>("after fourth conditional; x = ":wybe.string, ~tmp#68##0:wybe.string, ?tmp#67##0:wybe.string) #10 @failure_backtrack:nn:nn + wybe.string.print<0>[410bae77d3](~tmp#67##0:wybe.string)<{<>}; {<>}; {}> #27 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#167##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#167##0:wybe.phantom, ?tmp#168##0:wybe.phantom) @io:nn:nn foreign lpvm store(~%tmp#168##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn - wybe.string.,,<0>("before first disjunction: x = ":wybe.string, ~tmp#68##0:wybe.string, ?tmp#78##0:wybe.string) #22 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~x##0:wybe.int, ?tmp#80##0:wybe.string) #12 @failure_backtrack:nn:nn + wybe.int.fmt<0>(y##0:wybe.int, ?tmp#83##0:wybe.string) #13 @failure_backtrack:nn:nn + wybe.int.fmt<0>(~tmp#131##0:wybe.int, ?tmp#86##0:wybe.string) #14 @failure_backtrack:nn:nn + wybe.int.fmt<0>(s##0:wybe.int, ?tmp#88##0:wybe.string) #15 @failure_backtrack:nn:nn + wybe.string.,,<0>(", s = ":wybe.string, ~tmp#88##0:wybe.string, ?tmp#87##0:wybe.string) #16 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#86##0:wybe.string, ~tmp#87##0:wybe.string, ?tmp#85##0:wybe.string) #17 @failure_backtrack:nn:nn + wybe.string.,,<0>(", r = ":wybe.string, ~tmp#85##0:wybe.string, ?tmp#84##0:wybe.string) #18 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#83##0:wybe.string, ~tmp#84##0:wybe.string, ?tmp#82##0:wybe.string) #19 @failure_backtrack:nn:nn + wybe.string.,,<0>(", y = ":wybe.string, ~tmp#82##0:wybe.string, ?tmp#81##0:wybe.string) #20 @failure_backtrack:nn:nn + wybe.string.,,<0>(~tmp#80##0:wybe.string, ~tmp#81##0:wybe.string, ?tmp#79##0:wybe.string) #21 @failure_backtrack:nn:nn + wybe.string.,,<0>("before first disjunction: x = ":wybe.string, ~tmp#79##0:wybe.string, ?tmp#78##0:wybe.string) #22 @failure_backtrack:nn:nn wybe.string.print<0>[410bae77d3](~tmp#78##0:wybe.string)<{<>}; {<>}; {}> #28 @string:nn:nn foreign lpvm load(<>:wybe.phantom, ?%tmp#170##0:wybe.phantom) @io:nn:nn foreign c putchar('\n':wybe.char, ~tmp#170##0:wybe.phantom, ?tmp#156##0:wybe.phantom) @io:nn:nn @@ -232,7 +280,7 @@ proc #cont#4 > (3 calls) -proc #cont#5 > (2 calls) +proc #cont#5 > {semipure} (2 calls) 0: failure_backtrack.#cont#5<0> #cont#5(tmp#143##0:wybe.int, tmp#144##0:wybe.int, x##0:wybe.int, y##0:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}>: AliasPairs: [] @@ -275,15 +323,23 @@ proc #cont#5 > (2 calls) failure_backtrack.nope<0>(?tmp#164##0:wybe.bool) #24 @failure_backtrack:nn:nn case ~tmp#164##0:wybe.bool of 0: - foreign lpvm store(7:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn - failure_backtrack.#cont#6<0>(~tmp#143##0:wybe.int, ~tmp#144##0:wybe.int, 42:wybe.int, 21:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}> #28 + foreign lpvm store(13:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn + failure_backtrack.nope<0>(?tmp#163##0:wybe.bool) #26 @failure_backtrack:nn:nn + case ~tmp#163##0:wybe.bool of + 0: + foreign lpvm store(7:wybe.int, <>:wybe.int) @failure_backtrack:nn:nn + failure_backtrack.#cont#6<0>(~tmp#143##0:wybe.int, ~tmp#144##0:wybe.int, 42:wybe.int, 21:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}> #28 + + 1: + failure_backtrack.#cont#6<0>(~tmp#143##0:wybe.int, ~tmp#144##0:wybe.int, 29:wybe.int, 21:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}> #27 + 1: failure_backtrack.#cont#6<0>(~tmp#143##0:wybe.int, ~tmp#144##0:wybe.int, 28:wybe.int, 21:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}> #25 -proc #cont#6 > (3 calls) +proc #cont#6 > {semipure} (3 calls) 0: failure_backtrack.#cont#6<0> #cont#6(tmp#143##0:wybe.int, tmp#144##0:wybe.int, x##0:wybe.int, y##0:wybe.int)<{<>, <>, <>}; {<>, <>, <>}; {}>: AliasPairs: [] @@ -516,25 +572,33 @@ entry: %3 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %2) %4 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %0, i64 %3) %5 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.7, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>"(i64 %5) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %5) tail call ccc void @putchar(i8 10) - %6 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.9, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>"(i64 %6) + %6 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %7 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %8 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %7) + %9 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %6, i64 %8) + %10 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.9, i32 0, i32 0) to i64), i64 %9) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %10) tail call ccc void @putchar(i8 10) store i64 9, i64* @"resource#failure_backtrack.r" - %7 = tail call fastcc {i64, i1} @"failure_backtrack.nope2<0>"() - %8 = extractvalue {i64, i1} %7, 0 - %9 = extractvalue {i64, i1} %7, 1 - br i1 %9, label %if.then, label %if.else + %11 = tail call fastcc {i64, i1} @"failure_backtrack.nope2<0>"() + %12 = extractvalue {i64, i1} %11, 0 + %13 = extractvalue {i64, i1} %11, 1 + br i1 %13, label %if.then, label %if.else if.then: tail call fastcc void @"wybe.string.print<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.11, i32 0, i32 0) to i64)) tail call ccc void @putchar(i8 10) - musttail call fastcc void @"failure_backtrack.#cont#2<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 %8, i64 %"y##0") + musttail call fastcc void @"failure_backtrack.#cont#2<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 %12, i64 %"y##0") ret void if.else: store i64 %1, i64* @"resource#failure_backtrack.r" - %10 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.13, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %10) + %14 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %15 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %16 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %15) + %17 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %14, i64 %16) + %18 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.13, i32 0, i32 0) to i64), i64 %17) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %18) tail call ccc void @putchar(i8 10) musttail call fastcc void @"failure_backtrack.#cont#2<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 %"x##0", i64 %"y##0") ret void @@ -549,24 +613,32 @@ entry: %3 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %2) %4 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %0, i64 %3) %5 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.15, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>"(i64 %5) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %5) tail call ccc void @putchar(i8 10) - %6 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.17, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>"(i64 %6) + %6 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %7 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %8 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %7) + %9 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %6, i64 %8) + %10 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.17, i32 0, i32 0) to i64), i64 %9) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %10) tail call ccc void @putchar(i8 10) - %7 = tail call fastcc {i64, i1} @"failure_backtrack.nope2<0>"() - %8 = extractvalue {i64, i1} %7, 0 - %9 = extractvalue {i64, i1} %7, 1 - br i1 %9, label %if.then, label %if.else + %11 = tail call fastcc {i64, i1} @"failure_backtrack.nope2<0>"() + %12 = extractvalue {i64, i1} %11, 0 + %13 = extractvalue {i64, i1} %11, 1 + br i1 %13, label %if.then, label %if.else if.then: - store i64 %8, i64* @"resource#failure_backtrack.r" + store i64 %12, i64* @"resource#failure_backtrack.r" tail call fastcc void @"wybe.string.print<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.11, i32 0, i32 0) to i64)) tail call ccc void @putchar(i8 10) musttail call fastcc void @"failure_backtrack.#cont#3<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 25, i64 %"y##0") ret void if.else: - %10 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.13, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %10) + %14 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %15 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %16 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %15) + %17 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %14, i64 %16) + %18 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.13, i32 0, i32 0) to i64), i64 %17) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %18) tail call ccc void @putchar(i8 10) musttail call fastcc void @"failure_backtrack.#cont#3<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 %"x##0", i64 %"y##0") ret void @@ -581,31 +653,43 @@ entry: %3 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %2) %4 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %0, i64 %3) %5 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.19, i32 0, i32 0) to i64), i64 %4) - tail call fastcc void @"wybe.string.print<0>"(i64 %5) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %5) tail call ccc void @putchar(i8 10) - %6 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"y##0") - %7 = load i64, i64* @"resource#failure_backtrack.s" - %8 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %7) - %9 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.21, i32 0, i32 0) to i64), i64 %8) - %10 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %2, i64 %9) - %11 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %10) - %12 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %6, i64 %11) - %13 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.23, i32 0, i32 0) to i64), i64 %12) - %14 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %0, i64 %13) - %15 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.25, i32 0, i32 0) to i64), i64 %14) - tail call fastcc void @"wybe.string.print<0>"(i64 %15) + %6 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %7 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"y##0") + %8 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %9 = load i64, i64* @"resource#failure_backtrack.s" + %10 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %9) + %11 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.21, i32 0, i32 0) to i64), i64 %10) + %12 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %8, i64 %11) + %13 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %12) + %14 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %7, i64 %13) + %15 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.23, i32 0, i32 0) to i64), i64 %14) + %16 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %6, i64 %15) + %17 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.25, i32 0, i32 0) to i64), i64 %16) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %17) tail call ccc void @putchar(i8 10) store i64 10, i64* @"resource#failure_backtrack.r" - %16 = tail call fastcc i1 @"failure_backtrack.yup<0>"() - br i1 %16, label %if.then, label %if.else + %18 = tail call fastcc i1 @"failure_backtrack.yup<0>"() + br i1 %18, label %if.then, label %if.else if.then: store i64 41, i64* @"resource#failure_backtrack.s" - %17 = tail call fastcc i1 @"failure_backtrack.nope<0>"() - br i1 %17, label %if.then1, label %if.else1 + %19 = tail call fastcc i1 @"failure_backtrack.nope<0>"() + br i1 %19, label %if.then1, label %if.else1 if.else: store i64 %1, i64* @"resource#failure_backtrack.r" - %19 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.5, i32 0, i32 0) to i64), i64 %14) - tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %19) + %31 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %32 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"y##0") + %33 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %34 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %9) + %35 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.21, i32 0, i32 0) to i64), i64 %34) + %36 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %33, i64 %35) + %37 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %36) + %38 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %32, i64 %37) + %39 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.23, i32 0, i32 0) to i64), i64 %38) + %40 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %31, i64 %39) + %41 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.5, i32 0, i32 0) to i64), i64 %40) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %41) tail call ccc void @putchar(i8 10) musttail call fastcc void @"failure_backtrack.#cont#4<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 %"x##0", i64 %"y##0") ret void @@ -616,9 +700,19 @@ if.then1: ret void if.else1: store i64 %1, i64* @"resource#failure_backtrack.r" - store i64 %7, i64* @"resource#failure_backtrack.s" - %18 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.5, i32 0, i32 0) to i64), i64 %14) - tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %18) + store i64 %9, i64* @"resource#failure_backtrack.s" + %20 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %21 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"y##0") + %22 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %1) + %23 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %9) + %24 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.21, i32 0, i32 0) to i64), i64 %23) + %25 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %22, i64 %24) + %26 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %25) + %27 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %21, i64 %26) + %28 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.23, i32 0, i32 0) to i64), i64 %27) + %29 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %20, i64 %28) + %30 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.5, i32 0, i32 0) to i64), i64 %29) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %30) tail call ccc void @putchar(i8 10) musttail call fastcc void @"failure_backtrack.#cont#4<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 %"x##0", i64 %"y##0") ret void @@ -640,15 +734,25 @@ entry: %10 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.23, i32 0, i32 0) to i64), i64 %9) %11 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %0, i64 %10) %12 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.29, i32 0, i32 0) to i64), i64 %11) - tail call fastcc void @"wybe.string.print<0>"(i64 %12) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %12) tail call ccc void @putchar(i8 10) - %13 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.31, i32 0, i32 0) to i64), i64 %11) - tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %13) + %13 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"x##0") + %14 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %"y##0") + %15 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %2) + %16 = tail call fastcc i64 @"wybe.int.fmt<0>"(i64 %4) + %17 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.21, i32 0, i32 0) to i64), i64 %16) + %18 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %15, i64 %17) + %19 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.1, i32 0, i32 0) to i64), i64 %18) + %20 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %14, i64 %19) + %21 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.23, i32 0, i32 0) to i64), i64 %20) + %22 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 %13, i64 %21) + %23 = tail call fastcc i64 @"wybe.string.,,<0>"(i64 ptrtoint (i64* getelementptr inbounds ({i64, i64}, {i64, i64}* @failure_backtrack.31, i32 0, i32 0) to i64), i64 %22) + tail call fastcc void @"wybe.string.print<0>[410bae77d3]"(i64 %23) tail call ccc void @putchar(i8 10) store i64 11, i64* @"resource#failure_backtrack.r" store i64 40, i64* @"resource#failure_backtrack.s" - %14 = tail call fastcc i1 @"failure_backtrack.nope<0>"() - br i1 %14, label %if.then, label %if.else + %24 = tail call fastcc i1 @"failure_backtrack.nope<0>"() + br i1 %24, label %if.then, label %if.else if.then: musttail call fastcc void @"failure_backtrack.#cont#5<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 27, i64 13) ret void @@ -698,6 +802,13 @@ if.then: musttail call fastcc void @"failure_backtrack.#cont#6<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 28, i64 21) ret void if.else: + store i64 13, i64* @"resource#failure_backtrack.r" + %25 = tail call fastcc i1 @"failure_backtrack.nope<0>"() + br i1 %25, label %if.then1, label %if.else1 +if.then1: + musttail call fastcc void @"failure_backtrack.#cont#6<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 29, i64 21) + ret void +if.else1: store i64 7, i64* @"resource#failure_backtrack.r" musttail call fastcc void @"failure_backtrack.#cont#6<0>"(i64 %"tmp#143##0", i64 %"tmp#144##0", i64 42, i64 21) ret void diff --git a/test-cases/final-dump/foreign_test.exp b/test-cases/final-dump/foreign_test.exp index 60f2527c7..c67fcb39e 100644 --- a/test-cases/final-dump/foreign_test.exp +++ b/test-cases/final-dump/foreign_test.exp @@ -23,7 +23,7 @@ module top-level code > public {inline,semipure} (0 calls) foreign_test.#cont#2<0><{<>}; {<>}; {}> #5 -proc #cont#1 > {inline} (2 calls) +proc #cont#1 > {inline,semipure} (2 calls) 0: foreign_test.#cont#1<0> #cont#1()<{<>}; {<>}; {}>: AliasPairs: [] @@ -31,7 +31,7 @@ proc #cont#1 > {inline} (2 calls) foreign_test.#cont#2<0><{<>}; {<>}; {}> #3 -proc #cont#2 > (2 calls) +proc #cont#2 > {semipure} (2 calls) 0: foreign_test.#cont#2<0> #cont#2()<{<>}; {<>}; {}>: AliasPairs: [] @@ -51,7 +51,7 @@ proc #cont#2 > (2 calls) -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: foreign_test.#cont#3<0> #cont#3()<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/higher_order_loop.exp b/test-cases/final-dump/higher_order_loop.exp index 4c1cd6c62..1917b7d82 100644 --- a/test-cases/final-dump/higher_order_loop.exp +++ b/test-cases/final-dump/higher_order_loop.exp @@ -44,7 +44,7 @@ proc #closure#2 > {inline} (1 calls) foreign lpvm store(~%tmp#2##0:wybe.phantom, <>:wybe.phantom) @int:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: higher_order_loop.#cont#1<0> #cont#1(tmp#5##0:wybe.list({resource}(wybe.int)) <{}; {}; {0}>)<{<>}; {<>}; {0}>: AliasPairs: [] diff --git a/test-cases/final-dump/higher_order_tests.exp b/test-cases/final-dump/higher_order_tests.exp index 1e51f0a22..c54646a18 100644 --- a/test-cases/final-dump/higher_order_tests.exp +++ b/test-cases/final-dump/higher_order_tests.exp @@ -56,7 +56,7 @@ proc #anon#2 > {inline} (3 calls) foreign llvm icmp_eq(~anon#2#1##0:wybe.int, 1:wybe.int, ?#success##0:wybe.bool) @int:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: higher_order_tests.#cont#1<0> #cont#1(t##0:(wybe.int, ?wybe.bool))<{<>}; {<>}; {}>: AliasPairs: [] @@ -75,7 +75,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > (2 calls) +proc #cont#2 > {semipure} (2 calls) 0: higher_order_tests.#cont#2<0> #cont#2(t##0:(wybe.int, ?wybe.bool))<{<>}; {<>}; {}>: AliasPairs: [] @@ -94,7 +94,7 @@ proc #cont#2 > (2 calls) -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: higher_order_tests.#cont#3<0> #cont#3(t##0:(wybe.int, ?wybe.bool))<{<>}; {<>}; {}>: AliasPairs: [] @@ -113,7 +113,7 @@ proc #cont#3 > (2 calls) -proc #cont#4 > (2 calls) +proc #cont#4 > {semipure} (2 calls) 0: higher_order_tests.#cont#4<0> #cont#4([t##0:(wybe.int, ?wybe.bool)])<{<>}; {<>}; {}>: AliasPairs: [] @@ -136,7 +136,7 @@ proc #cont#4 > (2 calls) -proc #cont#5 > (2 calls) +proc #cont#5 > {semipure} (2 calls) 0: higher_order_tests.#cont#5<0> #cont#5(t##0:(wybe.int, ?wybe.bool))<{<>}; {<>}; {}>: AliasPairs: [] @@ -155,7 +155,7 @@ proc #cont#5 > (2 calls) -proc #cont#6 > (2 calls) +proc #cont#6 > {semipure} (2 calls) 0: higher_order_tests.#cont#6<0> #cont#6(t##0:(wybe.int, ?wybe.bool))<{<>}; {<>}; {}>: AliasPairs: [] @@ -174,7 +174,7 @@ proc #cont#6 > (2 calls) -proc #cont#7 > (2 calls) +proc #cont#7 > {semipure} (2 calls) 0: higher_order_tests.#cont#7<0> #cont#7(t##0:(wybe.int, ?wybe.bool))<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/int_sequence.exp b/test-cases/final-dump/int_sequence.exp index f30a64361..c7cf4e00c 100644 --- a/test-cases/final-dump/int_sequence.exp +++ b/test-cases/final-dump/int_sequence.exp @@ -30,7 +30,7 @@ module top-level code > public {semipure} (0 calls) int_sequence.#cont#1<0>[410bae77d3](~tmp#1##0:int_sequence)<{<>}; {<>}; {}> #1 @int_sequence:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: int_sequence.#cont#1<0>[410bae77d3] #cont#1(tmp#0##0:int_sequence)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/list_loop.exp b/test-cases/final-dump/list_loop.exp index fed843d97..086a571c8 100644 --- a/test-cases/final-dump/list_loop.exp +++ b/test-cases/final-dump/list_loop.exp @@ -37,7 +37,7 @@ module top-level code > public {semipure} (0 calls) list_loop.#cont#1<0>(~tmp#22##0:list_loop.intlist, ~tmp#22##0:list_loop.intlist)<{<>}; {<>}; {}> #4 @list_loop:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: list_loop.#cont#1<0> #cont#1(l##0:list_loop.intlist, x##0:list_loop.intlist)<{<>}; {<>}; {}>: AliasPairs: [] @@ -57,7 +57,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > {inline} (1 calls) +proc #cont#2 > {inline,semipure} (1 calls) 0: list_loop.#cont#2<0> #cont#2(h##0:wybe.int, l##0:list_loop.intlist, x##0:list_loop.intlist)<{<>}; {<>}; {}>: AliasPairs: [] @@ -69,7 +69,7 @@ proc #cont#2 > {inline} (1 calls) list_loop.#cont#3<0>(~h##0:wybe.int, ~l##0:list_loop.intlist, ~x##0:list_loop.intlist, ~x##0:list_loop.intlist)<{<>}; {<>}; {}> #1 @list_loop:nn:nn -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: list_loop.#cont#3<0> #cont#3(h##0:wybe.int, l##0:list_loop.intlist, l2##0:list_loop.intlist, x##0:list_loop.intlist)<{<>}; {<>}; {}>: AliasPairs: [] @@ -95,7 +95,7 @@ proc #cont#3 > (2 calls) -proc #cont#4 > {inline} (1 calls) +proc #cont#4 > {inline,semipure} (1 calls) 0: list_loop.#cont#4<0> #cont#4(h##0:wybe.int, h2##0:wybe.int, l##0:list_loop.intlist, l2##0:list_loop.intlist, x##0:list_loop.intlist)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/nested_loop.exp b/test-cases/final-dump/nested_loop.exp index b69403b0a..211dc060e 100644 --- a/test-cases/final-dump/nested_loop.exp +++ b/test-cases/final-dump/nested_loop.exp @@ -25,7 +25,7 @@ module top-level code > public {semipure} (0 calls) nested_loop.#cont#2<0><{<>}; {<>}; {}> #3 @nested_loop:nn:nn -proc #cont#1 > {inline} (1 calls) +proc #cont#1 > {inline,semipure} (1 calls) 0: nested_loop.#cont#1<0> #cont#1()<{<>}; {<>}; {}>: AliasPairs: [] @@ -41,7 +41,7 @@ proc #cont#1 > {inline} (1 calls) nested_loop.#cont#2<0><{<>}; {<>}; {}> #4 @nested_loop:nn:nn -proc #cont#2 > {inline} (2 calls) +proc #cont#2 > {inline,semipure} (2 calls) 0: nested_loop.#cont#2<0> #cont#2()<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/resource_rollback.exp b/test-cases/final-dump/resource_rollback.exp index 446790e18..95d442c17 100644 --- a/test-cases/final-dump/resource_rollback.exp +++ b/test-cases/final-dump/resource_rollback.exp @@ -35,7 +35,7 @@ module top-level code > public {semipure} (0 calls) -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: resource_rollback.#cont#1<0> #cont#1()<{<>, <>, <>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/resource_tmp_vars.exp b/test-cases/final-dump/resource_tmp_vars.exp index e1e5dcdb8..775adfc0d 100644 --- a/test-cases/final-dump/resource_tmp_vars.exp +++ b/test-cases/final-dump/resource_tmp_vars.exp @@ -23,7 +23,7 @@ module top-level code > public {semipure} (0 calls) foreign lpvm store(~%tmp#9##0:wybe.phantom, <>:wybe.phantom) @io:nn:nn -proc #cont#1 > {inline} (1 calls) +proc #cont#1 > {inline,semipure} (1 calls) 0: resource_tmp_vars.#cont#1<0> #cont#1([tmp#0##0:wybe.int], tmp#1##0:wybe.int)<{<>}; {<>, <>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/simple_loop.exp b/test-cases/final-dump/simple_loop.exp index dbab6b88d..66fa34a8e 100644 --- a/test-cases/final-dump/simple_loop.exp +++ b/test-cases/final-dump/simple_loop.exp @@ -17,7 +17,7 @@ module top-level code > public {inline,semipure} (0 calls) simple_loop.#cont#1<0><{<>}; {<>}; {}> #0 @simple_loop:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: simple_loop.#cont#1<0> #cont#1()<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/stmt_unless.exp b/test-cases/final-dump/stmt_unless.exp index 628a9b052..30b7cf332 100644 --- a/test-cases/final-dump/stmt_unless.exp +++ b/test-cases/final-dump/stmt_unless.exp @@ -18,7 +18,7 @@ module top-level code > public {inline,semipure} (0 calls) stmt_unless.#cont#1<0>(10:wybe.int)<{<>}; {<>}; {}> #0 @stmt_unless:nn:nn -proc #cont#1 > (3 calls) +proc #cont#1 > {semipure} (3 calls) 0: stmt_unless.#cont#1<0> #cont#1(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] @@ -32,7 +32,7 @@ proc #cont#1 > (3 calls) -proc #cont#2 > (1 calls) +proc #cont#2 > {semipure} (1 calls) 0: stmt_unless.#cont#2<0> #cont#2(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/stmt_until.exp b/test-cases/final-dump/stmt_until.exp index 4a1fddb12..fce80bafc 100644 --- a/test-cases/final-dump/stmt_until.exp +++ b/test-cases/final-dump/stmt_until.exp @@ -17,7 +17,7 @@ module top-level code > public {inline,semipure} (0 calls) stmt_until.#cont#1<0>(10:wybe.int)<{<>}; {<>}; {}> #0 @stmt_until:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: stmt_until.#cont#1<0> #cont#1(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] @@ -36,7 +36,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > {inline} (1 calls) +proc #cont#2 > {inline,semipure} (1 calls) 0: stmt_until.#cont#2<0> #cont#2(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/stmt_when.exp b/test-cases/final-dump/stmt_when.exp index 50f1e55c6..8dbab36b6 100644 --- a/test-cases/final-dump/stmt_when.exp +++ b/test-cases/final-dump/stmt_when.exp @@ -18,7 +18,7 @@ module top-level code > public {inline,semipure} (0 calls) stmt_when.#cont#1<0>(10:wybe.int)<{<>}; {<>}; {}> #0 @stmt_when:nn:nn -proc #cont#1 > (3 calls) +proc #cont#1 > {semipure} (3 calls) 0: stmt_when.#cont#1<0> #cont#1(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] @@ -32,7 +32,7 @@ proc #cont#1 > (3 calls) -proc #cont#2 > (1 calls) +proc #cont#2 > {semipure} (1 calls) 0: stmt_when.#cont#2<0> #cont#2(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/stmt_while.exp b/test-cases/final-dump/stmt_while.exp index 0841a8dcd..011a599a7 100644 --- a/test-cases/final-dump/stmt_while.exp +++ b/test-cases/final-dump/stmt_while.exp @@ -17,7 +17,7 @@ module top-level code > public {inline,semipure} (0 calls) stmt_while.#cont#1<0>(10:wybe.int)<{<>}; {<>}; {}> #0 @stmt_while:nn:nn -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: stmt_while.#cont#1<0> #cont#1(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] @@ -36,7 +36,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > {inline} (1 calls) +proc #cont#2 > {inline,semipure} (1 calls) 0: stmt_while.#cont#2<0> #cont#2(n##0:wybe.int)<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/type_generics.exp b/test-cases/final-dump/type_generics.exp index ca40cb880..dbdcdf322 100644 --- a/test-cases/final-dump/type_generics.exp +++ b/test-cases/final-dump/type_generics.exp @@ -32,7 +32,7 @@ module top-level code > public {semipure} (0 calls) -proc #cont#1 > (2 calls) +proc #cont#1 > {semipure} (2 calls) 0: type_generics.#cont#1<0> #cont#1([x##0:wybe.float])<{<>}; {<>}; {}>: AliasPairs: [] @@ -51,7 +51,7 @@ proc #cont#1 > (2 calls) -proc #cont#2 > (2 calls) +proc #cont#2 > {semipure} (2 calls) 0: type_generics.#cont#2<0> #cont#2([x##0:wybe.float])<{<>}; {<>}; {}>: AliasPairs: [] @@ -70,7 +70,7 @@ proc #cont#2 > (2 calls) -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: type_generics.#cont#3<0> #cont#3([x##0:wybe.float])<{<>}; {<>}; {}>: AliasPairs: [] @@ -89,7 +89,7 @@ proc #cont#3 > (2 calls) -proc #cont#4 > (2 calls) +proc #cont#4 > {semipure} (2 calls) 0: type_generics.#cont#4<0> #cont#4()<{<>}; {<>}; {}>: AliasPairs: [] @@ -108,7 +108,7 @@ proc #cont#4 > (2 calls) -proc #cont#5 > (2 calls) +proc #cont#5 > {semipure} (2 calls) 0: type_generics.#cont#5<0> #cont#5()<{<>}; {<>}; {}>: AliasPairs: [] diff --git a/test-cases/final-dump/unbranch_bug.exp b/test-cases/final-dump/unbranch_bug.exp index 7f5c0d71e..235beba39 100644 --- a/test-cases/final-dump/unbranch_bug.exp +++ b/test-cases/final-dump/unbranch_bug.exp @@ -17,21 +17,21 @@ module top-level code > public {inline,semipure} (0 calls) unbranch_bug.#cont#3<0>(0:wybe.list(5))<{<>}; {<>}; {}> #1 @unbranch_bug:nn:nn -proc #cont#1 > {inline} (1 calls) +proc #cont#1 > {inline,semipure} (1 calls) 0: unbranch_bug.#cont#1<0> #cont#1()<{}; {}; {}>: AliasPairs: [] InterestingCallProperties: [] -proc #cont#2 > {inline} (1 calls) +proc #cont#2 > {inline,semipure} (1 calls) 0: unbranch_bug.#cont#2<0> #cont#2()<{}; {}; {}>: AliasPairs: [] InterestingCallProperties: [] -proc #cont#3 > (2 calls) +proc #cont#3 > {semipure} (2 calls) 0: unbranch_bug.#cont#3<0> #cont#3(tmp#0##0:wybe.list(5) <{}; {}; {0}>)<{<>}; {<>}; {}>: AliasPairs: []