diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll index 86e240b51c3e..49cbe866833a 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedExpr.qll @@ -1259,7 +1259,9 @@ class TranslatedUnaryExpr extends TranslatedSingleInstructionExpr { expr instanceof NotExpr or expr instanceof ComplementExpr or expr instanceof UnaryPlusExpr or - expr instanceof UnaryMinusExpr + expr instanceof UnaryMinusExpr or + expr instanceof CoAwaitExpr or + expr instanceof CoYieldExpr } final override Instruction getFirstInstruction(EdgeKind kind) { @@ -1299,6 +1301,12 @@ class TranslatedUnaryExpr extends TranslatedSingleInstructionExpr { expr instanceof UnaryPlusExpr and result instanceof Opcode::CopyValue or expr instanceof UnaryMinusExpr and result instanceof Opcode::Negate + or + // TODO: Use a new opcode to represent "awaiting the value" + expr instanceof CoAwaitExpr and result instanceof Opcode::CopyValue + or + // TODO: Use a new opcode to represent "awaiting the value" + expr instanceof CoYieldExpr and result instanceof Opcode::CopyValue } private TranslatedExpr getOperand() { diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll index d8ec66a2ee71..fab2dacc8a78 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll @@ -1501,3 +1501,41 @@ class TranslatedVlaDeclarationStmt extends TranslatedStmt { override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() } } + +class TranslatedCoReturnStmt extends TranslatedStmt { + override CoReturnStmt stmt; + + private TranslatedExpr getTranslatedOperand() { + result = getTranslatedExpr(stmt.getOperand().getFullyConverted()) + } + + override TranslatedExpr getChildInternal(int id) { + id = 0 and + result = this.getTranslatedOperand() + } + + override Instruction getFirstInstruction(EdgeKind kind) { + result = this.getTranslatedOperand().getFirstInstruction(kind) + } + + override Instruction getALastInstructionInternal() { + result = this.getInstruction(OnlyInstructionTag()) + } + + override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) { + tag = OnlyInstructionTag() and + opcode instanceof Opcode::NoOp and + resultType = getVoidType() + } + + override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) { + tag = OnlyInstructionTag() and + result = this.getParent().getChildSuccessor(this, kind) + } + + override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { + child = this.getTranslatedOperand() and + kind instanceof GotoEdge and + result = this.getInstruction(OnlyInstructionTag()) + } +} diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index 2f1810a4020c..1bd3aa555ec9 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -747,6 +747,42 @@ coroutines.cpp: # 87| m87_4(unknown) = Chi : total:m87_2, partial:m87_3 # 87| r87_5(glval) = VariableAddress[(unnamed local variable)] : # 87| m87_6(promise_type) = Uninitialized[(unnamed local variable)] : &:r87_5 +# 87| r87_7(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_8(glval) = FunctionAddress[initial_suspend] : +# 87| r87_9(suspend_always) = Call[initial_suspend] : func:r87_8, this:r87_7 +# 87| m87_10(unknown) = ^CallSideEffect : ~m87_4 +# 87| m87_11(unknown) = Chi : total:m87_4, partial:m87_10 +# 87| v87_12(void) = ^IndirectReadSideEffect[-1] : &:r87_7, m87_6 +# 87| m87_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_7 +# 87| m87_14(promise_type) = Chi : total:m87_6, partial:m87_13 +#-----| v0_1(void) = CopyValue : r87_9 +#-----| r0_2(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_3(glval) = FunctionAddress[return_void] : +#-----| v0_4(void) = Call[return_void] : func:r0_3, this:r0_2 +#-----| m0_5(unknown) = ^CallSideEffect : ~m87_11 +#-----| m0_6(unknown) = Chi : total:m87_11, partial:m0_5 +#-----| v0_7(void) = ^IndirectReadSideEffect[-1] : &:r0_2, m87_14 +#-----| m0_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_2 +#-----| m0_9(promise_type) = Chi : total:m87_14, partial:m0_8 +# 88| v88_1(void) = NoOp : +#-----| v0_10(void) = NoOp : +#-----| Goto (back edge) -> Block 1 + +#-----| Block 1 +#-----| v0_11(void) = NoOp : +# 87| r87_15(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_16(glval) = FunctionAddress[final_suspend] : +# 87| r87_17(suspend_always) = Call[final_suspend] : func:r87_16, this:r87_15 +# 87| m87_18(unknown) = ^CallSideEffect : ~m0_6 +# 87| m87_19(unknown) = Chi : total:m0_6, partial:m87_18 +# 87| v87_20(void) = ^IndirectReadSideEffect[-1] : &:r87_15, m0_9 +# 87| m87_21(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_15 +# 87| m87_22(promise_type) = Chi : total:m0_9, partial:m87_21 +#-----| v0_12(void) = CopyValue : r87_17 +# 87| r87_23(glval) = VariableAddress[#return] : +# 87| v87_24(void) = ReturnValue : &:r87_23, ~m87_19 +# 87| v87_25(void) = AliasedUse : ~m87_19 +# 87| v87_26(void) = ExitFunction : # 91| co_returnable_value co_return_int(int) # 91| Block 0 @@ -762,6 +798,44 @@ coroutines.cpp: #-----| m0_4(int) = Store[i] : &:r0_1, r0_3 # 91| r91_7(glval) = VariableAddress[(unnamed local variable)] : # 91| m91_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r91_7 +# 91| r91_9(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_10(glval) = FunctionAddress[initial_suspend] : +# 91| r91_11(suspend_always) = Call[initial_suspend] : func:r91_10, this:r91_9 +# 91| m91_12(unknown) = ^CallSideEffect : ~m91_4 +# 91| m91_13(unknown) = Chi : total:m91_4, partial:m91_12 +# 91| v91_14(void) = ^IndirectReadSideEffect[-1] : &:r91_9, m91_8 +# 91| m91_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_9 +# 91| m91_16(promise_type) = Chi : total:m91_8, partial:m91_15 +#-----| v0_5(void) = CopyValue : r91_11 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_value] : +# 92| r92_1(glval) = VariableAddress[i] : +# 92| r92_2(int) = Load[i] : &:r92_1, m0_4 +#-----| v0_8(void) = Call[return_value] : func:r0_7, this:r0_6, 0:r92_2 +#-----| m0_9(unknown) = ^CallSideEffect : ~m91_13 +#-----| m0_10(unknown) = Chi : total:m91_13, partial:m0_9 +#-----| v0_11(void) = ^IndirectReadSideEffect[-1] : &:r0_6, m91_16 +#-----| m0_12(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +#-----| m0_13(promise_type) = Chi : total:m91_16, partial:m0_12 +# 92| v92_3(void) = NoOp : +#-----| v0_14(void) = NoOp : +#-----| Goto (back edge) -> Block 1 + +#-----| Block 1 +#-----| v0_15(void) = NoOp : +# 91| r91_17(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_18(glval) = FunctionAddress[final_suspend] : +# 91| r91_19(suspend_always) = Call[final_suspend] : func:r91_18, this:r91_17 +# 91| m91_20(unknown) = ^CallSideEffect : ~m0_10 +# 91| m91_21(unknown) = Chi : total:m0_10, partial:m91_20 +# 91| v91_22(void) = ^IndirectReadSideEffect[-1] : &:r91_17, m0_13 +# 91| m91_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_17 +# 91| m91_24(promise_type) = Chi : total:m0_13, partial:m91_23 +#-----| v0_16(void) = CopyValue : r91_19 +# 91| r91_25(glval) = VariableAddress[#return] : +# 91| v91_26(void) = ReturnValue : &:r91_25, ~m91_21 +# 91| v91_27(void) = AliasedUse : ~m91_21 +# 91| v91_28(void) = ExitFunction : # 95| co_returnable_void co_yield_value_void(int) # 95| Block 0 @@ -777,21 +851,102 @@ coroutines.cpp: #-----| m0_4(int) = Store[i] : &:r0_1, r0_3 # 95| r95_7(glval) = VariableAddress[(unnamed local variable)] : # 95| m95_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r95_7 +# 95| r95_9(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_10(glval) = FunctionAddress[initial_suspend] : +# 95| r95_11(suspend_always) = Call[initial_suspend] : func:r95_10, this:r95_9 +# 95| m95_12(unknown) = ^CallSideEffect : ~m95_4 +# 95| m95_13(unknown) = Chi : total:m95_4, partial:m95_12 +# 95| v95_14(void) = ^IndirectReadSideEffect[-1] : &:r95_9, m95_8 +# 95| m95_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_9 +# 95| m95_16(promise_type) = Chi : total:m95_8, partial:m95_15 +#-----| v0_5(void) = CopyValue : r95_11 +# 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : +# 96| r96_2(glval) = FunctionAddress[yield_value] : +# 96| r96_3(glval) = VariableAddress[i] : +# 96| r96_4(int) = Load[i] : &:r96_3, m0_4 +# 96| r96_5(suspend_always) = Call[yield_value] : func:r96_2, this:r96_1, 0:r96_4 +# 96| m96_6(unknown) = ^CallSideEffect : ~m95_13 +# 96| m96_7(unknown) = Chi : total:m95_13, partial:m96_6 +# 96| v96_8(void) = ^IndirectReadSideEffect[-1] : &:r96_1, m95_16 +# 96| m96_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 +# 96| m96_10(promise_type) = Chi : total:m95_16, partial:m96_9 +# 96| v96_11(void) = CopyValue : r96_5 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_void] : +#-----| v0_8(void) = Call[return_void] : func:r0_7, this:r0_6 +#-----| m0_9(unknown) = ^CallSideEffect : ~m96_7 +#-----| m0_10(unknown) = Chi : total:m96_7, partial:m0_9 +#-----| v0_11(void) = ^IndirectReadSideEffect[-1] : &:r0_6, m96_10 +#-----| m0_12(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +#-----| m0_13(promise_type) = Chi : total:m96_10, partial:m0_12 +# 97| v97_1(void) = NoOp : +#-----| v0_14(void) = NoOp : +#-----| Goto (back edge) -> Block 1 + +#-----| Block 1 +#-----| v0_15(void) = NoOp : +# 95| r95_17(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_18(glval) = FunctionAddress[final_suspend] : +# 95| r95_19(suspend_always) = Call[final_suspend] : func:r95_18, this:r95_17 +# 95| m95_20(unknown) = ^CallSideEffect : ~m0_10 +# 95| m95_21(unknown) = Chi : total:m0_10, partial:m95_20 +# 95| v95_22(void) = ^IndirectReadSideEffect[-1] : &:r95_17, m0_13 +# 95| m95_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_17 +# 95| m95_24(promise_type) = Chi : total:m0_13, partial:m95_23 +#-----| v0_16(void) = CopyValue : r95_19 +# 95| r95_25(glval) = VariableAddress[#return] : +# 95| v95_26(void) = ReturnValue : &:r95_25, ~m95_21 +# 95| v95_27(void) = AliasedUse : ~m95_21 +# 95| v95_28(void) = ExitFunction : # 99| co_returnable_value co_yield_value_value(int) # 99| Block 0 -# 99| v99_1(void) = EnterFunction : -# 99| m99_2(unknown) = AliasedDefinition : -# 99| m99_3(unknown) = InitializeNonLocal : -# 99| m99_4(unknown) = Chi : total:m99_2, partial:m99_3 -# 99| r99_5(glval) = VariableAddress[i] : -# 99| m99_6(int) = InitializeParameter[i] : &:r99_5 -#-----| r0_1(glval) = VariableAddress[i] : -#-----| r0_2(glval) = VariableAddress[i] : -#-----| r0_3(int) = Load[i] : &:r0_2, m99_6 -#-----| m0_4(int) = Store[i] : &:r0_1, r0_3 -# 99| r99_7(glval) = VariableAddress[(unnamed local variable)] : -# 99| m99_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r99_7 +# 99| v99_1(void) = EnterFunction : +# 99| m99_2(unknown) = AliasedDefinition : +# 99| m99_3(unknown) = InitializeNonLocal : +# 99| m99_4(unknown) = Chi : total:m99_2, partial:m99_3 +# 99| r99_5(glval) = VariableAddress[i] : +# 99| m99_6(int) = InitializeParameter[i] : &:r99_5 +#-----| r0_1(glval) = VariableAddress[i] : +#-----| r0_2(glval) = VariableAddress[i] : +#-----| r0_3(int) = Load[i] : &:r0_2, m99_6 +#-----| m0_4(int) = Store[i] : &:r0_1, r0_3 +# 99| r99_7(glval) = VariableAddress[(unnamed local variable)] : +# 99| m99_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r99_7 +# 99| r99_9(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_10(glval) = FunctionAddress[initial_suspend] : +# 99| r99_11(suspend_always) = Call[initial_suspend] : func:r99_10, this:r99_9 +# 99| m99_12(unknown) = ^CallSideEffect : ~m99_4 +# 99| m99_13(unknown) = Chi : total:m99_4, partial:m99_12 +# 99| v99_14(void) = ^IndirectReadSideEffect[-1] : &:r99_9, m99_8 +# 99| m99_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_9 +# 99| m99_16(promise_type) = Chi : total:m99_8, partial:m99_15 +#-----| v0_5(void) = CopyValue : r99_11 +# 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : +# 100| r100_2(glval) = FunctionAddress[yield_value] : +# 100| r100_3(glval) = VariableAddress[i] : +# 100| r100_4(int) = Load[i] : &:r100_3, m0_4 +# 100| r100_5(suspend_always) = Call[yield_value] : func:r100_2, this:r100_1, 0:r100_4 +# 100| m100_6(unknown) = ^CallSideEffect : ~m99_13 +# 100| m100_7(unknown) = Chi : total:m99_13, partial:m100_6 +# 100| v100_8(void) = ^IndirectReadSideEffect[-1] : &:r100_1, m99_16 +# 100| m100_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 +# 100| m100_10(promise_type) = Chi : total:m99_16, partial:m100_9 +# 100| v100_11(void) = CopyValue : r100_5 +#-----| v0_6(void) = NoOp : +# 99| r99_17(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_18(glval) = FunctionAddress[final_suspend] : +# 99| r99_19(suspend_always) = Call[final_suspend] : func:r99_18, this:r99_17 +# 99| m99_20(unknown) = ^CallSideEffect : ~m100_7 +# 99| m99_21(unknown) = Chi : total:m100_7, partial:m99_20 +# 99| v99_22(void) = ^IndirectReadSideEffect[-1] : &:r99_17, m100_10 +# 99| m99_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_17 +# 99| m99_24(promise_type) = Chi : total:m100_10, partial:m99_23 +#-----| v0_7(void) = CopyValue : r99_19 +# 99| r99_25(glval) = VariableAddress[#return] : +# 99| v99_26(void) = ReturnValue : &:r99_25, ~m99_21 +# 99| v99_27(void) = AliasedUse : ~m99_21 +# 99| v99_28(void) = ExitFunction : # 103| co_returnable_void co_yield_and_return_void(int) # 103| Block 0 @@ -807,6 +962,53 @@ coroutines.cpp: #-----| m0_4(int) = Store[i] : &:r0_1, r0_3 # 103| r103_7(glval) = VariableAddress[(unnamed local variable)] : # 103| m103_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r103_7 +# 103| r103_9(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_10(glval) = FunctionAddress[initial_suspend] : +# 103| r103_11(suspend_always) = Call[initial_suspend] : func:r103_10, this:r103_9 +# 103| m103_12(unknown) = ^CallSideEffect : ~m103_4 +# 103| m103_13(unknown) = Chi : total:m103_4, partial:m103_12 +# 103| v103_14(void) = ^IndirectReadSideEffect[-1] : &:r103_9, m103_8 +# 103| m103_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_9 +# 103| m103_16(promise_type) = Chi : total:m103_8, partial:m103_15 +#-----| v0_5(void) = CopyValue : r103_11 +# 104| r104_1(glval) = VariableAddress[(unnamed local variable)] : +# 104| r104_2(glval) = FunctionAddress[yield_value] : +# 104| r104_3(glval) = VariableAddress[i] : +# 104| r104_4(int) = Load[i] : &:r104_3, m0_4 +# 104| r104_5(suspend_always) = Call[yield_value] : func:r104_2, this:r104_1, 0:r104_4 +# 104| m104_6(unknown) = ^CallSideEffect : ~m103_13 +# 104| m104_7(unknown) = Chi : total:m103_13, partial:m104_6 +# 104| v104_8(void) = ^IndirectReadSideEffect[-1] : &:r104_1, m103_16 +# 104| m104_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_1 +# 104| m104_10(promise_type) = Chi : total:m103_16, partial:m104_9 +# 104| v104_11(void) = CopyValue : r104_5 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_void] : +#-----| v0_8(void) = Call[return_void] : func:r0_7, this:r0_6 +#-----| m0_9(unknown) = ^CallSideEffect : ~m104_7 +#-----| m0_10(unknown) = Chi : total:m104_7, partial:m0_9 +#-----| v0_11(void) = ^IndirectReadSideEffect[-1] : &:r0_6, m104_10 +#-----| m0_12(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +#-----| m0_13(promise_type) = Chi : total:m104_10, partial:m0_12 +# 105| v105_1(void) = NoOp : +#-----| v0_14(void) = NoOp : +#-----| Goto (back edge) -> Block 1 + +#-----| Block 1 +#-----| v0_15(void) = NoOp : +# 103| r103_17(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_18(glval) = FunctionAddress[final_suspend] : +# 103| r103_19(suspend_always) = Call[final_suspend] : func:r103_18, this:r103_17 +# 103| m103_20(unknown) = ^CallSideEffect : ~m0_10 +# 103| m103_21(unknown) = Chi : total:m0_10, partial:m103_20 +# 103| v103_22(void) = ^IndirectReadSideEffect[-1] : &:r103_17, m0_13 +# 103| m103_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_17 +# 103| m103_24(promise_type) = Chi : total:m0_13, partial:m103_23 +#-----| v0_16(void) = CopyValue : r103_19 +# 103| r103_25(glval) = VariableAddress[#return] : +# 103| v103_26(void) = ReturnValue : &:r103_25, ~m103_21 +# 103| v103_27(void) = AliasedUse : ~m103_21 +# 103| v103_28(void) = ExitFunction : # 108| co_returnable_value co_yield_and_return_value(int) # 108| Block 0 @@ -822,6 +1024,57 @@ coroutines.cpp: #-----| m0_4(int) = Store[i] : &:r0_1, r0_3 # 108| r108_7(glval) = VariableAddress[(unnamed local variable)] : # 108| m108_8(promise_type) = Uninitialized[(unnamed local variable)] : &:r108_7 +# 108| r108_9(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_10(glval) = FunctionAddress[initial_suspend] : +# 108| r108_11(suspend_always) = Call[initial_suspend] : func:r108_10, this:r108_9 +# 108| m108_12(unknown) = ^CallSideEffect : ~m108_4 +# 108| m108_13(unknown) = Chi : total:m108_4, partial:m108_12 +# 108| v108_14(void) = ^IndirectReadSideEffect[-1] : &:r108_9, m108_8 +# 108| m108_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_9 +# 108| m108_16(promise_type) = Chi : total:m108_8, partial:m108_15 +#-----| v0_5(void) = CopyValue : r108_11 +# 109| r109_1(glval) = VariableAddress[(unnamed local variable)] : +# 109| r109_2(glval) = FunctionAddress[yield_value] : +# 109| r109_3(glval) = VariableAddress[i] : +# 109| r109_4(int) = Load[i] : &:r109_3, m0_4 +# 109| r109_5(suspend_always) = Call[yield_value] : func:r109_2, this:r109_1, 0:r109_4 +# 109| m109_6(unknown) = ^CallSideEffect : ~m108_13 +# 109| m109_7(unknown) = Chi : total:m108_13, partial:m109_6 +# 109| v109_8(void) = ^IndirectReadSideEffect[-1] : &:r109_1, m108_16 +# 109| m109_9(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_1 +# 109| m109_10(promise_type) = Chi : total:m108_16, partial:m109_9 +# 109| v109_11(void) = CopyValue : r109_5 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_value] : +# 110| r110_1(glval) = VariableAddress[i] : +# 110| r110_2(int) = Load[i] : &:r110_1, m0_4 +# 110| r110_3(int) = Constant[1] : +# 110| r110_4(int) = Add : r110_2, r110_3 +#-----| v0_8(void) = Call[return_value] : func:r0_7, this:r0_6, 0:r110_4 +#-----| m0_9(unknown) = ^CallSideEffect : ~m109_7 +#-----| m0_10(unknown) = Chi : total:m109_7, partial:m0_9 +#-----| v0_11(void) = ^IndirectReadSideEffect[-1] : &:r0_6, m109_10 +#-----| m0_12(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +#-----| m0_13(promise_type) = Chi : total:m109_10, partial:m0_12 +# 110| v110_5(void) = NoOp : +#-----| v0_14(void) = NoOp : +#-----| Goto (back edge) -> Block 1 + +#-----| Block 1 +#-----| v0_15(void) = NoOp : +# 108| r108_17(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_18(glval) = FunctionAddress[final_suspend] : +# 108| r108_19(suspend_always) = Call[final_suspend] : func:r108_18, this:r108_17 +# 108| m108_20(unknown) = ^CallSideEffect : ~m0_10 +# 108| m108_21(unknown) = Chi : total:m0_10, partial:m108_20 +# 108| v108_22(void) = ^IndirectReadSideEffect[-1] : &:r108_17, m0_13 +# 108| m108_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_17 +# 108| m108_24(promise_type) = Chi : total:m0_13, partial:m108_23 +#-----| v0_16(void) = CopyValue : r108_19 +# 108| r108_25(glval) = VariableAddress[#return] : +# 108| v108_26(void) = ReturnValue : &:r108_25, ~m108_21 +# 108| v108_27(void) = AliasedUse : ~m108_21 +# 108| v108_28(void) = ExitFunction : destructors_for_temps.cpp: # 9| void ClassWithConstructor::ClassWithConstructor(ClassWithConstructor&&) diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected index 208ab45aefab..b93c7d2649f8 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected @@ -6,12 +6,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| coroutines.cpp:87:20:87:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | ambiguousSuccessors unexplainedLoop unnecessaryPhiInstruction diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected index 208ab45aefab..b93c7d2649f8 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected @@ -6,12 +6,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| coroutines.cpp:87:20:87:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | ambiguousSuccessors unexplainedLoop unnecessaryPhiInstruction diff --git a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected index 50009fe76412..943fd6753eba 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_consistency.expected @@ -38,43 +38,21 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| coroutines.cpp:87:20:87:20 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:87:20:87:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:88:11 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | coroutines.cpp:87:20:88:11 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:91:21:91:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | | coroutines.cpp:91:21:92:11 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | | coroutines.cpp:91:21:92:11 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:95:20:95:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | | coroutines.cpp:95:20:96:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | | coroutines.cpp:95:20:96:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:96:12:96:12 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | | coroutines.cpp:96:13:96:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:99:21:99:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | | coroutines.cpp:99:21:100:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | | coroutines.cpp:99:21:100:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:100:12:100:12 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | | coroutines.cpp:100:13:100:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:103:20:103:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | | coroutines.cpp:103:20:104:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | | coroutines.cpp:103:20:104:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:104:12:104:12 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | | coroutines.cpp:104:13:104:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:108:21:108:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | coroutines.cpp:108:21:109:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | coroutines.cpp:108:21:109:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| coroutines.cpp:109:12:109:12 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | coroutines.cpp:109:13:109:13 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | @@ -82,11 +60,6 @@ instructionWithoutSuccessor | file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | | file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | | file://:0:0:0:0 | CopyValue: ... , ... | Instruction 'CopyValue: ... , ...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | IndirectMayWriteSideEffect: (unnamed local variable) | Instruction 'IndirectMayWriteSideEffect: (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | @@ -113,12 +86,6 @@ instructionWithoutSuccessor | file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | file://:0:0:0:0 | IndirectReadSideEffect: (const suspend_always)... | Instruction 'IndirectReadSideEffect: (const suspend_always)...' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | -| file://:0:0:0:0 | NoOp: label ...: | Instruction 'NoOp: label ...:' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| file://:0:0:0:0 | NoOp: label ...: | Instruction 'NoOp: label ...:' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| file://:0:0:0:0 | NoOp: label ...: | Instruction 'NoOp: label ...:' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| file://:0:0:0:0 | NoOp: label ...: | Instruction 'NoOp: label ...:' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| file://:0:0:0:0 | NoOp: label ...: | Instruction 'NoOp: label ...:' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| file://:0:0:0:0 | NoOp: label ...: | Instruction 'NoOp: label ...:' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | | file://:0:0:0:0 | Store: ... = ... | Instruction 'Store: ... = ...' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | | file://:0:0:0:0 | Store: ... = ... | Instruction 'Store: ... = ...' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | | file://:0:0:0:0 | Store: ... = ... | Instruction 'Store: ... = ...' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 21f946036e89..28c2fc45502b 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -787,117 +787,110 @@ coroutines.cpp: # 87| mu87_3(unknown) = InitializeNonLocal : # 87| r87_4(glval) = VariableAddress[(unnamed local variable)] : # 87| mu87_5(promise_type) = Uninitialized[(unnamed local variable)] : &:r87_4 +# 87| r87_6(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_7(glval) = FunctionAddress[initial_suspend] : +# 87| r87_8(suspend_always) = Call[initial_suspend] : func:r87_7, this:r87_6 +# 87| mu87_9(unknown) = ^CallSideEffect : ~m? +# 87| v87_10(void) = ^IndirectReadSideEffect[-1] : &:r87_6, ~m? +# 87| mu87_11(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_6 +#-----| v0_1(void) = CopyValue : r87_8 +#-----| r0_2(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_3(glval) = FunctionAddress[return_void] : +#-----| v0_4(void) = Call[return_void] : func:r0_3, this:r0_2 +#-----| mu0_5(unknown) = ^CallSideEffect : ~m? +#-----| v0_6(void) = ^IndirectReadSideEffect[-1] : &:r0_2, ~m? +#-----| mu0_7(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_2 +# 88| v88_1(void) = NoOp : +#-----| v0_8(void) = NoOp : +#-----| Goto (back edge) -> Block 9 # 87| Block 1 -# 87| v87_6(void) = AliasedUse : ~m? -# 87| v87_7(void) = ExitFunction : +# 87| v87_12(void) = AliasedUse : ~m? +# 87| v87_13(void) = ExitFunction : # 87| Block 2 -# 87| r87_8(glval) = VariableAddress[#return] : -# 87| v87_9(void) = ReturnValue : &:r87_8, ~m? +# 87| v87_14(void) = Unwind : #-----| Goto -> Block 1 -# 87| Block 3 -# 87| v87_10(void) = Unwind : -#-----| Goto -> Block 1 +#-----| Block 3 +#-----| r0_9(bool) = Constant[1] : +#-----| r0_10(glval) = VariableAddress : +#-----| mu0_11(bool) = Store[?] : &:r0_10, r0_9 -# 87| Block 4 -# 87| r87_11(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_13(glval) = FunctionAddress[initial_suspend] : -# 87| r87_15(suspend_always) = Call[initial_suspend] : func:r87_13, this:r87_11 -# 87| mu87_17(unknown) = ^CallSideEffect : ~m? -# 87| v87_19(void) = ^IndirectReadSideEffect[-1] : &:r87_11, ~m? -# 87| mu87_21(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_11 +#-----| Block 4 +#-----| r0_12(glval) = VariableAddress[#temp0:0] : +# 87| r87_15(glval) = VariableAddress[#temp87:20] : +# 87| r87_17(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_19(glval) = FunctionAddress[initial_suspend] : +# 87| r87_21(suspend_always) = Call[initial_suspend] : func:r87_19, this:r87_17 +# 87| mu87_23(unknown) = ^CallSideEffect : ~m? +# 87| v87_25(void) = ^IndirectReadSideEffect[-1] : &:r87_17, ~m? +# 87| mu87_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_17 +# 87| mu87_29(suspend_always) = Store[#temp87:20] : &:r87_15, r87_21 +# 87| r87_31(suspend_always *) = CopyValue : r87_15 +# 87| mu87_33(suspend_always *) = Store[#temp0:0] : &:r0_12, r87_31 +#-----| r0_14(suspend_always *) = Load[#temp0:0] : &:r0_12, ~m? +# 87| r87_35(glval) = CopyValue : r0_14 +# 87| r87_37(glval) = Convert : r87_35 +# 87| r87_39(glval) = FunctionAddress[await_ready] : +# 87| r87_41(bool) = Call[await_ready] : func:r87_39, this:r87_37 +# 87| mu87_43(unknown) = ^CallSideEffect : ~m? +# 87| v87_45(void) = ^IndirectReadSideEffect[-1] : &:r87_37, ~m? #-----| Block 4 -#-----| r0_1(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_2(glval) = FunctionAddress[return_void] : -#-----| v0_3(void) = Call[return_void] : func:r0_2, this:r0_1 -#-----| mu0_4(unknown) = ^CallSideEffect : ~m? -#-----| v0_5(void) = ^IndirectReadSideEffect[-1] : &:r0_1, ~m? -#-----| mu0_6(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_1 - -# 87| Block 4 -# 87| r87_11(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_13(glval) = FunctionAddress[final_suspend] : -# 87| r87_15(suspend_always) = Call[final_suspend] : func:r87_13, this:r87_11 -# 87| mu87_17(unknown) = ^CallSideEffect : ~m? -# 87| v87_19(void) = ^IndirectReadSideEffect[-1] : &:r87_11, ~m? -# 87| mu87_21(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_11 +#-----| r0_12(glval) = VariableAddress[#temp0:0] : +# 87| r87_15(glval) = VariableAddress[#temp87:20] : +# 87| r87_17(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_19(glval) = FunctionAddress[final_suspend] : +# 87| r87_21(suspend_always) = Call[final_suspend] : func:r87_19, this:r87_17 +# 87| mu87_23(unknown) = ^CallSideEffect : ~m? +# 87| v87_25(void) = ^IndirectReadSideEffect[-1] : &:r87_17, ~m? +# 87| mu87_27(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_17 +# 87| mu87_29(suspend_always) = Store[#temp87:20] : &:r87_15, r87_21 +# 87| r87_31(suspend_always *) = CopyValue : r87_15 +# 87| mu87_33(suspend_always *) = Store[#temp0:0] : &:r0_12, r87_31 +#-----| r0_14(suspend_always *) = Load[#temp0:0] : &:r0_12, ~m? +# 87| r87_35(glval) = CopyValue : r0_14 +# 87| r87_37(glval) = Convert : r87_35 +# 87| r87_39(glval) = FunctionAddress[await_ready] : +# 87| r87_41(bool) = Call[await_ready] : func:r87_39, this:r87_37 +# 87| mu87_43(unknown) = ^CallSideEffect : ~m? +# 87| v87_45(void) = ^IndirectReadSideEffect[-1] : &:r87_37, ~m? + +#-----| Block 6 +#-----| v0_16(void) = CatchAny : +#-----| r0_17(glval) = VariableAddress : +#-----| r0_18(bool) = Load[?] : &:r0_17, ~m? +#-----| r0_19(bool) = LogicalNot : r0_18 +#-----| v0_20(void) = ConditionalBranch : r0_19 +#-----| False -> Block 8 +#-----| True -> Block 7 #-----| Block 7 -#-----| r0_7(bool) = Constant[1] : -#-----| r0_8(glval) = VariableAddress : -#-----| mu0_9(bool) = Store[?] : &:r0_8, r0_7 - -#-----| Block 8 -#-----| r0_10(glval) = VariableAddress[#temp0:0] : -# 87| r87_23(glval) = VariableAddress[#temp87:20] : -# 87| r87_25(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_27(glval) = FunctionAddress[initial_suspend] : -# 87| r87_29(suspend_always) = Call[initial_suspend] : func:r87_27, this:r87_25 -# 87| mu87_31(unknown) = ^CallSideEffect : ~m? -# 87| v87_33(void) = ^IndirectReadSideEffect[-1] : &:r87_25, ~m? -# 87| mu87_35(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_25 -# 87| mu87_37(suspend_always) = Store[#temp87:20] : &:r87_23, r87_29 -# 87| r87_39(suspend_always *) = CopyValue : r87_23 -# 87| mu87_41(suspend_always *) = Store[#temp0:0] : &:r0_10, r87_39 -#-----| r0_12(suspend_always *) = Load[#temp0:0] : &:r0_10, ~m? -# 87| r87_43(glval) = CopyValue : r0_12 -# 87| r87_45(glval) = Convert : r87_43 -# 87| r87_47(glval) = FunctionAddress[await_ready] : -# 87| r87_49(bool) = Call[await_ready] : func:r87_47, this:r87_45 -# 87| mu87_51(unknown) = ^CallSideEffect : ~m? -# 87| v87_53(void) = ^IndirectReadSideEffect[-1] : &:r87_45, ~m? - -#-----| Block 8 -#-----| r0_10(glval) = VariableAddress[#temp0:0] : -# 87| r87_23(glval) = VariableAddress[#temp87:20] : -# 87| r87_25(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_27(glval) = FunctionAddress[final_suspend] : -# 87| r87_29(suspend_always) = Call[final_suspend] : func:r87_27, this:r87_25 -# 87| mu87_31(unknown) = ^CallSideEffect : ~m? -# 87| v87_33(void) = ^IndirectReadSideEffect[-1] : &:r87_25, ~m? -# 87| mu87_35(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_25 -# 87| mu87_37(suspend_always) = Store[#temp87:20] : &:r87_23, r87_29 -# 87| r87_39(suspend_always *) = CopyValue : r87_23 -# 87| mu87_41(suspend_always *) = Store[#temp0:0] : &:r0_10, r87_39 -#-----| r0_12(suspend_always *) = Load[#temp0:0] : &:r0_10, ~m? -# 87| r87_43(glval) = CopyValue : r0_12 -# 87| r87_45(glval) = Convert : r87_43 -# 87| r87_47(glval) = FunctionAddress[await_ready] : -# 87| r87_49(bool) = Call[await_ready] : func:r87_47, this:r87_45 -# 87| mu87_51(unknown) = ^CallSideEffect : ~m? -# 87| v87_53(void) = ^IndirectReadSideEffect[-1] : &:r87_45, ~m? - -#-----| Block 10 -#-----| v0_14(void) = NoOp : -#-----| Goto (back edge) -> Block 14 - -#-----| Block 11 -#-----| v0_15(void) = CatchAny : -#-----| r0_16(glval) = VariableAddress : -#-----| r0_17(bool) = Load[?] : &:r0_16, ~m? -#-----| r0_18(bool) = LogicalNot : r0_17 -#-----| v0_19(void) = ConditionalBranch : r0_18 -#-----| False -> Block 13 -#-----| True -> Block 12 - -#-----| Block 12 -#-----| v0_20(void) = ReThrow : -#-----| Exception -> Block 3 +#-----| v0_21(void) = ReThrow : +#-----| Exception -> Block 2 -# 87| Block 13 -# 87| r87_55(glval) = VariableAddress[(unnamed local variable)] : -# 87| r87_56(glval) = FunctionAddress[unhandled_exception] : -# 87| v87_57(void) = Call[unhandled_exception] : func:r87_56, this:r87_55 -# 87| mu87_58(unknown) = ^CallSideEffect : ~m? -# 87| v87_59(void) = ^IndirectReadSideEffect[-1] : &:r87_55, ~m? -# 87| mu87_60(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_55 -#-----| Goto -> Block 14 +# 87| Block 8 +# 87| r87_47(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_48(glval) = FunctionAddress[unhandled_exception] : +# 87| v87_49(void) = Call[unhandled_exception] : func:r87_48, this:r87_47 +# 87| mu87_50(unknown) = ^CallSideEffect : ~m? +# 87| v87_51(void) = ^IndirectReadSideEffect[-1] : &:r87_47, ~m? +# 87| mu87_52(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_47 +#-----| Goto -> Block 9 -#-----| Block 14 -#-----| v0_21(void) = NoOp : +#-----| Block 9 +#-----| v0_22(void) = NoOp : +# 87| r87_53(glval) = VariableAddress[(unnamed local variable)] : +# 87| r87_54(glval) = FunctionAddress[final_suspend] : +# 87| r87_55(suspend_always) = Call[final_suspend] : func:r87_54, this:r87_53 +# 87| mu87_56(unknown) = ^CallSideEffect : ~m? +# 87| v87_57(void) = ^IndirectReadSideEffect[-1] : &:r87_53, ~m? +# 87| mu87_58(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_53 +#-----| v0_23(void) = CopyValue : r87_55 +# 87| r87_59(glval) = VariableAddress[#return] : +# 87| v87_60(void) = ReturnValue : &:r87_59, ~m? +#-----| Goto -> Block 1 # 91| co_returnable_value co_return_int(int) # 91| (no string representation) @@ -967,119 +960,112 @@ coroutines.cpp: #-----| mu0_4(int) = Store[i] : &:r0_1, r0_3 # 91| r91_6(glval) = VariableAddress[(unnamed local variable)] : # 91| mu91_7(promise_type) = Uninitialized[(unnamed local variable)] : &:r91_6 +# 91| r91_8(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_9(glval) = FunctionAddress[initial_suspend] : +# 91| r91_10(suspend_always) = Call[initial_suspend] : func:r91_9, this:r91_8 +# 91| mu91_11(unknown) = ^CallSideEffect : ~m? +# 91| v91_12(void) = ^IndirectReadSideEffect[-1] : &:r91_8, ~m? +# 91| mu91_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_8 +#-----| v0_5(void) = CopyValue : r91_10 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_value] : +# 92| r92_1(glval) = VariableAddress[i] : +# 92| r92_2(int) = Load[i] : &:r92_1, ~m? +#-----| v0_8(void) = Call[return_value] : func:r0_7, this:r0_6, 0:r92_2 +#-----| mu0_9(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_6, ~m? +#-----| mu0_11(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +# 92| v92_3(void) = NoOp : +#-----| v0_12(void) = NoOp : +#-----| Goto (back edge) -> Block 9 # 91| Block 1 -# 91| v91_8(void) = AliasedUse : ~m? -# 91| v91_9(void) = ExitFunction : +# 91| v91_14(void) = AliasedUse : ~m? +# 91| v91_15(void) = ExitFunction : # 91| Block 2 -# 91| r91_10(glval) = VariableAddress[#return] : -# 91| v91_11(void) = ReturnValue : &:r91_10, ~m? +# 91| v91_16(void) = Unwind : #-----| Goto -> Block 1 -# 91| Block 3 -# 91| v91_12(void) = Unwind : -#-----| Goto -> Block 1 +#-----| Block 3 +#-----| r0_13(bool) = Constant[1] : +#-----| r0_14(glval) = VariableAddress : +#-----| mu0_15(bool) = Store[?] : &:r0_14, r0_13 -# 91| Block 4 -# 91| r91_13(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_15(glval) = FunctionAddress[initial_suspend] : -# 91| r91_17(suspend_always) = Call[initial_suspend] : func:r91_15, this:r91_13 -# 91| mu91_19(unknown) = ^CallSideEffect : ~m? -# 91| v91_21(void) = ^IndirectReadSideEffect[-1] : &:r91_13, ~m? -# 91| mu91_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_13 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 91| r91_17(glval) = VariableAddress[#temp91:21] : +# 91| r91_19(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_21(glval) = FunctionAddress[initial_suspend] : +# 91| r91_23(suspend_always) = Call[initial_suspend] : func:r91_21, this:r91_19 +# 91| mu91_25(unknown) = ^CallSideEffect : ~m? +# 91| v91_27(void) = ^IndirectReadSideEffect[-1] : &:r91_19, ~m? +# 91| mu91_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_19 +# 91| mu91_31(suspend_always) = Store[#temp91:21] : &:r91_17, r91_23 +# 91| r91_33(suspend_always *) = CopyValue : r91_17 +# 91| mu91_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r91_33 +#-----| r0_18(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 91| r91_37(glval) = CopyValue : r0_18 +# 91| r91_39(glval) = Convert : r91_37 +# 91| r91_41(glval) = FunctionAddress[await_ready] : +# 91| r91_43(bool) = Call[await_ready] : func:r91_41, this:r91_39 +# 91| mu91_45(unknown) = ^CallSideEffect : ~m? +# 91| v91_47(void) = ^IndirectReadSideEffect[-1] : &:r91_39, ~m? #-----| Block 4 -#-----| r0_5(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_6(glval) = FunctionAddress[return_value] : -# 92| r92_1(glval) = VariableAddress[i] : -# 92| r92_2(int) = Load[i] : &:r92_1, ~m? -#-----| v0_7(void) = Call[return_value] : func:r0_6, this:r0_5, 0:r92_2 -#-----| mu0_8(unknown) = ^CallSideEffect : ~m? -#-----| v0_9(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -#-----| mu0_10(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_5 - -# 91| Block 4 -# 91| r91_13(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_15(glval) = FunctionAddress[final_suspend] : -# 91| r91_17(suspend_always) = Call[final_suspend] : func:r91_15, this:r91_13 -# 91| mu91_19(unknown) = ^CallSideEffect : ~m? -# 91| v91_21(void) = ^IndirectReadSideEffect[-1] : &:r91_13, ~m? -# 91| mu91_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_13 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 91| r91_17(glval) = VariableAddress[#temp91:21] : +# 91| r91_19(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_21(glval) = FunctionAddress[final_suspend] : +# 91| r91_23(suspend_always) = Call[final_suspend] : func:r91_21, this:r91_19 +# 91| mu91_25(unknown) = ^CallSideEffect : ~m? +# 91| v91_27(void) = ^IndirectReadSideEffect[-1] : &:r91_19, ~m? +# 91| mu91_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_19 +# 91| mu91_31(suspend_always) = Store[#temp91:21] : &:r91_17, r91_23 +# 91| r91_33(suspend_always *) = CopyValue : r91_17 +# 91| mu91_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r91_33 +#-----| r0_18(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 91| r91_37(glval) = CopyValue : r0_18 +# 91| r91_39(glval) = Convert : r91_37 +# 91| r91_41(glval) = FunctionAddress[await_ready] : +# 91| r91_43(bool) = Call[await_ready] : func:r91_41, this:r91_39 +# 91| mu91_45(unknown) = ^CallSideEffect : ~m? +# 91| v91_47(void) = ^IndirectReadSideEffect[-1] : &:r91_39, ~m? + +#-----| Block 6 +#-----| v0_20(void) = CatchAny : +#-----| r0_21(glval) = VariableAddress : +#-----| r0_22(bool) = Load[?] : &:r0_21, ~m? +#-----| r0_23(bool) = LogicalNot : r0_22 +#-----| v0_24(void) = ConditionalBranch : r0_23 +#-----| False -> Block 8 +#-----| True -> Block 7 #-----| Block 7 -#-----| r0_11(bool) = Constant[1] : -#-----| r0_12(glval) = VariableAddress : -#-----| mu0_13(bool) = Store[?] : &:r0_12, r0_11 - -#-----| Block 8 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 91| r91_25(glval) = VariableAddress[#temp91:21] : -# 91| r91_27(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_29(glval) = FunctionAddress[initial_suspend] : -# 91| r91_31(suspend_always) = Call[initial_suspend] : func:r91_29, this:r91_27 -# 91| mu91_33(unknown) = ^CallSideEffect : ~m? -# 91| v91_35(void) = ^IndirectReadSideEffect[-1] : &:r91_27, ~m? -# 91| mu91_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_27 -# 91| mu91_39(suspend_always) = Store[#temp91:21] : &:r91_25, r91_31 -# 91| r91_41(suspend_always *) = CopyValue : r91_25 -# 91| mu91_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r91_41 -#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 91| r91_45(glval) = CopyValue : r0_16 -# 91| r91_47(glval) = Convert : r91_45 -# 91| r91_49(glval) = FunctionAddress[await_ready] : -# 91| r91_51(bool) = Call[await_ready] : func:r91_49, this:r91_47 -# 91| mu91_53(unknown) = ^CallSideEffect : ~m? -# 91| v91_55(void) = ^IndirectReadSideEffect[-1] : &:r91_47, ~m? - -#-----| Block 8 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 91| r91_25(glval) = VariableAddress[#temp91:21] : -# 91| r91_27(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_29(glval) = FunctionAddress[final_suspend] : -# 91| r91_31(suspend_always) = Call[final_suspend] : func:r91_29, this:r91_27 -# 91| mu91_33(unknown) = ^CallSideEffect : ~m? -# 91| v91_35(void) = ^IndirectReadSideEffect[-1] : &:r91_27, ~m? -# 91| mu91_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_27 -# 91| mu91_39(suspend_always) = Store[#temp91:21] : &:r91_25, r91_31 -# 91| r91_41(suspend_always *) = CopyValue : r91_25 -# 91| mu91_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r91_41 -#-----| r0_16(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 91| r91_45(glval) = CopyValue : r0_16 -# 91| r91_47(glval) = Convert : r91_45 -# 91| r91_49(glval) = FunctionAddress[await_ready] : -# 91| r91_51(bool) = Call[await_ready] : func:r91_49, this:r91_47 -# 91| mu91_53(unknown) = ^CallSideEffect : ~m? -# 91| v91_55(void) = ^IndirectReadSideEffect[-1] : &:r91_47, ~m? - -#-----| Block 10 -#-----| v0_18(void) = NoOp : -#-----| Goto (back edge) -> Block 14 - -#-----| Block 11 -#-----| v0_19(void) = CatchAny : -#-----| r0_20(glval) = VariableAddress : -#-----| r0_21(bool) = Load[?] : &:r0_20, ~m? -#-----| r0_22(bool) = LogicalNot : r0_21 -#-----| v0_23(void) = ConditionalBranch : r0_22 -#-----| False -> Block 13 -#-----| True -> Block 12 - -#-----| Block 12 -#-----| v0_24(void) = ReThrow : -#-----| Exception -> Block 3 +#-----| v0_25(void) = ReThrow : +#-----| Exception -> Block 2 -# 91| Block 13 -# 91| r91_57(glval) = VariableAddress[(unnamed local variable)] : -# 91| r91_58(glval) = FunctionAddress[unhandled_exception] : -# 91| v91_59(void) = Call[unhandled_exception] : func:r91_58, this:r91_57 -# 91| mu91_60(unknown) = ^CallSideEffect : ~m? -# 91| v91_61(void) = ^IndirectReadSideEffect[-1] : &:r91_57, ~m? -# 91| mu91_62(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_57 -#-----| Goto -> Block 14 +# 91| Block 8 +# 91| r91_49(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_50(glval) = FunctionAddress[unhandled_exception] : +# 91| v91_51(void) = Call[unhandled_exception] : func:r91_50, this:r91_49 +# 91| mu91_52(unknown) = ^CallSideEffect : ~m? +# 91| v91_53(void) = ^IndirectReadSideEffect[-1] : &:r91_49, ~m? +# 91| mu91_54(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_49 +#-----| Goto -> Block 9 -#-----| Block 14 -#-----| v0_25(void) = NoOp : +#-----| Block 9 +#-----| v0_26(void) = NoOp : +# 91| r91_55(glval) = VariableAddress[(unnamed local variable)] : +# 91| r91_56(glval) = FunctionAddress[final_suspend] : +# 91| r91_57(suspend_always) = Call[final_suspend] : func:r91_56, this:r91_55 +# 91| mu91_58(unknown) = ^CallSideEffect : ~m? +# 91| v91_59(void) = ^IndirectReadSideEffect[-1] : &:r91_55, ~m? +# 91| mu91_60(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_55 +#-----| v0_27(void) = CopyValue : r91_57 +# 91| r91_61(glval) = VariableAddress[#return] : +# 91| v91_62(void) = ReturnValue : &:r91_61, ~m? +#-----| Goto -> Block 1 # 95| co_returnable_void co_yield_value_void(int) # 95| (no string representation) @@ -1176,29 +1162,13 @@ coroutines.cpp: #-----| mu0_4(int) = Store[i] : &:r0_1, r0_3 # 95| r95_6(glval) = VariableAddress[(unnamed local variable)] : # 95| mu95_7(promise_type) = Uninitialized[(unnamed local variable)] : &:r95_6 - -# 95| Block 1 -# 95| v95_8(void) = AliasedUse : ~m? -# 95| v95_9(void) = ExitFunction : - -# 95| Block 2 -# 95| r95_10(glval) = VariableAddress[#return] : -# 95| v95_11(void) = ReturnValue : &:r95_10, ~m? -#-----| Goto -> Block 1 - -# 95| Block 3 -# 95| v95_12(void) = Unwind : -#-----| Goto -> Block 1 - -# 95| Block 4 -# 95| r95_13(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_15(glval) = FunctionAddress[initial_suspend] : -# 95| r95_17(suspend_always) = Call[initial_suspend] : func:r95_15, this:r95_13 -# 95| mu95_19(unknown) = ^CallSideEffect : ~m? -# 95| v95_21(void) = ^IndirectReadSideEffect[-1] : &:r95_13, ~m? -# 95| mu95_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_13 - -# 96| Block 4 +# 95| r95_8(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_9(glval) = FunctionAddress[initial_suspend] : +# 95| r95_10(suspend_always) = Call[initial_suspend] : func:r95_9, this:r95_8 +# 95| mu95_11(unknown) = ^CallSideEffect : ~m? +# 95| v95_12(void) = ^IndirectReadSideEffect[-1] : &:r95_8, ~m? +# 95| mu95_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_8 +#-----| v0_5(void) = CopyValue : r95_10 # 96| r96_1(glval) = VariableAddress[(unnamed local variable)] : # 96| r96_2(glval) = FunctionAddress[yield_value] : # 96| r96_3(glval) = VariableAddress[i] : @@ -1207,118 +1177,126 @@ coroutines.cpp: # 96| mu96_6(unknown) = ^CallSideEffect : ~m? # 96| v96_7(void) = ^IndirectReadSideEffect[-1] : &:r96_1, ~m? # 96| mu96_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_1 +# 96| v96_9(void) = CopyValue : r96_5 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_void] : +#-----| v0_8(void) = Call[return_void] : func:r0_7, this:r0_6 +#-----| mu0_9(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_6, ~m? +#-----| mu0_11(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +# 97| v97_1(void) = NoOp : +#-----| v0_12(void) = NoOp : +#-----| Goto (back edge) -> Block 10 -#-----| Block 4 -#-----| r0_5(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_6(glval) = FunctionAddress[return_void] : -#-----| v0_7(void) = Call[return_void] : func:r0_6, this:r0_5 -#-----| mu0_8(unknown) = ^CallSideEffect : ~m? -#-----| v0_9(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -#-----| mu0_10(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_5 - -# 95| Block 4 -# 95| r95_13(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_15(glval) = FunctionAddress[final_suspend] : -# 95| r95_17(suspend_always) = Call[final_suspend] : func:r95_15, this:r95_13 -# 95| mu95_19(unknown) = ^CallSideEffect : ~m? -# 95| v95_21(void) = ^IndirectReadSideEffect[-1] : &:r95_13, ~m? -# 95| mu95_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_13 +# 95| Block 1 +# 95| v95_14(void) = AliasedUse : ~m? +# 95| v95_15(void) = ExitFunction : -#-----| Block 8 -#-----| r0_11(bool) = Constant[1] : -#-----| r0_12(glval) = VariableAddress : -#-----| mu0_13(bool) = Store[?] : &:r0_12, r0_11 +# 95| Block 2 +# 95| v95_16(void) = Unwind : +#-----| Goto -> Block 1 -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 95| r95_25(glval) = VariableAddress[#temp95:20] : -# 95| r95_27(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_29(glval) = FunctionAddress[initial_suspend] : -# 95| r95_31(suspend_always) = Call[initial_suspend] : func:r95_29, this:r95_27 -# 95| mu95_33(unknown) = ^CallSideEffect : ~m? -# 95| v95_35(void) = ^IndirectReadSideEffect[-1] : &:r95_27, ~m? -# 95| mu95_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_27 -# 95| mu95_39(suspend_always) = Store[#temp95:20] : &:r95_25, r95_31 -# 95| r95_41(suspend_always *) = CopyValue : r95_25 -# 95| mu95_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r95_41 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 95| r95_45(glval) = CopyValue : r0_17 -# 95| r95_47(glval) = Convert : r95_45 -# 95| r95_49(glval) = FunctionAddress[await_ready] : -# 95| r95_51(bool) = Call[await_ready] : func:r95_49, this:r95_47 -# 95| mu95_53(unknown) = ^CallSideEffect : ~m? -# 95| v95_55(void) = ^IndirectReadSideEffect[-1] : &:r95_47, ~m? +#-----| Block 3 +#-----| r0_13(bool) = Constant[1] : +#-----| r0_14(glval) = VariableAddress : +#-----| mu0_15(bool) = Store[?] : &:r0_14, r0_13 -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 96| r96_9(glval) = VariableAddress[#temp96:13] : -# 96| r96_10(glval) = VariableAddress[(unnamed local variable)] : -# 96| r96_11(glval) = FunctionAddress[yield_value] : -# 96| r96_12(glval) = VariableAddress[i] : -# 96| r96_13(int) = Load[i] : &:r96_12, ~m? -# 96| r96_14(suspend_always) = Call[yield_value] : func:r96_11, this:r96_10, 0:r96_13 -# 96| mu96_15(unknown) = ^CallSideEffect : ~m? -# 96| v96_16(void) = ^IndirectReadSideEffect[-1] : &:r96_10, ~m? -# 96| mu96_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_10 -# 96| mu96_18(suspend_always) = Store[#temp96:13] : &:r96_9, r96_14 -# 96| r96_19(suspend_always *) = CopyValue : r96_9 -# 96| mu96_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r96_19 -#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 96| r96_21(glval) = CopyValue : r0_19 -# 96| r96_22(glval) = Convert : r96_21 -# 96| r96_23(glval) = FunctionAddress[await_ready] : -# 96| r96_24(bool) = Call[await_ready] : func:r96_23, this:r96_22 -# 96| mu96_25(unknown) = ^CallSideEffect : ~m? -# 96| v96_26(void) = ^IndirectReadSideEffect[-1] : &:r96_22, ~m? +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 95| r95_17(glval) = VariableAddress[#temp95:20] : +# 95| r95_19(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_21(glval) = FunctionAddress[initial_suspend] : +# 95| r95_23(suspend_always) = Call[initial_suspend] : func:r95_21, this:r95_19 +# 95| mu95_25(unknown) = ^CallSideEffect : ~m? +# 95| v95_27(void) = ^IndirectReadSideEffect[-1] : &:r95_19, ~m? +# 95| mu95_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_19 +# 95| mu95_31(suspend_always) = Store[#temp95:20] : &:r95_17, r95_23 +# 95| r95_33(suspend_always *) = CopyValue : r95_17 +# 95| mu95_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r95_33 +#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 95| r95_37(glval) = CopyValue : r0_19 +# 95| r95_39(glval) = Convert : r95_37 +# 95| r95_41(glval) = FunctionAddress[await_ready] : +# 95| r95_43(bool) = Call[await_ready] : func:r95_41, this:r95_39 +# 95| mu95_45(unknown) = ^CallSideEffect : ~m? +# 95| v95_47(void) = ^IndirectReadSideEffect[-1] : &:r95_39, ~m? -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 95| r95_25(glval) = VariableAddress[#temp95:20] : -# 95| r95_27(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_29(glval) = FunctionAddress[final_suspend] : -# 95| r95_31(suspend_always) = Call[final_suspend] : func:r95_29, this:r95_27 -# 95| mu95_33(unknown) = ^CallSideEffect : ~m? -# 95| v95_35(void) = ^IndirectReadSideEffect[-1] : &:r95_27, ~m? -# 95| mu95_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_27 -# 95| mu95_39(suspend_always) = Store[#temp95:20] : &:r95_25, r95_31 -# 95| r95_41(suspend_always *) = CopyValue : r95_25 -# 95| mu95_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r95_41 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 95| r95_45(glval) = CopyValue : r0_17 -# 95| r95_47(glval) = Convert : r95_45 -# 95| r95_49(glval) = FunctionAddress[await_ready] : -# 95| r95_51(bool) = Call[await_ready] : func:r95_49, this:r95_47 -# 95| mu95_53(unknown) = ^CallSideEffect : ~m? -# 95| v95_55(void) = ^IndirectReadSideEffect[-1] : &:r95_47, ~m? - -#-----| Block 12 -#-----| v0_20(void) = NoOp : -#-----| Goto (back edge) -> Block 16 - -#-----| Block 13 -#-----| v0_21(void) = CatchAny : -#-----| r0_22(glval) = VariableAddress : -#-----| r0_23(bool) = Load[?] : &:r0_22, ~m? -#-----| r0_24(bool) = LogicalNot : r0_23 -#-----| v0_25(void) = ConditionalBranch : r0_24 -#-----| False -> Block 15 -#-----| True -> Block 14 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 96| r96_10(glval) = VariableAddress[#temp96:13] : +# 96| r96_11(glval) = VariableAddress[(unnamed local variable)] : +# 96| r96_12(glval) = FunctionAddress[yield_value] : +# 96| r96_13(glval) = VariableAddress[i] : +# 96| r96_14(int) = Load[i] : &:r96_13, ~m? +# 96| r96_15(suspend_always) = Call[yield_value] : func:r96_12, this:r96_11, 0:r96_14 +# 96| mu96_16(unknown) = ^CallSideEffect : ~m? +# 96| v96_17(void) = ^IndirectReadSideEffect[-1] : &:r96_11, ~m? +# 96| mu96_18(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r96_11 +# 96| mu96_19(suspend_always) = Store[#temp96:13] : &:r96_10, r96_15 +# 96| r96_20(suspend_always *) = CopyValue : r96_10 +# 96| mu96_21(suspend_always *) = Store[#temp0:0] : &:r0_16, r96_20 +#-----| r0_21(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 96| r96_22(glval) = CopyValue : r0_21 +# 96| r96_23(glval) = Convert : r96_22 +# 96| r96_24(glval) = FunctionAddress[await_ready] : +# 96| r96_25(bool) = Call[await_ready] : func:r96_24, this:r96_23 +# 96| mu96_26(unknown) = ^CallSideEffect : ~m? +# 96| v96_27(void) = ^IndirectReadSideEffect[-1] : &:r96_23, ~m? -#-----| Block 14 -#-----| v0_26(void) = ReThrow : -#-----| Exception -> Block 3 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 95| r95_17(glval) = VariableAddress[#temp95:20] : +# 95| r95_19(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_21(glval) = FunctionAddress[final_suspend] : +# 95| r95_23(suspend_always) = Call[final_suspend] : func:r95_21, this:r95_19 +# 95| mu95_25(unknown) = ^CallSideEffect : ~m? +# 95| v95_27(void) = ^IndirectReadSideEffect[-1] : &:r95_19, ~m? +# 95| mu95_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_19 +# 95| mu95_31(suspend_always) = Store[#temp95:20] : &:r95_17, r95_23 +# 95| r95_33(suspend_always *) = CopyValue : r95_17 +# 95| mu95_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r95_33 +#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 95| r95_37(glval) = CopyValue : r0_19 +# 95| r95_39(glval) = Convert : r95_37 +# 95| r95_41(glval) = FunctionAddress[await_ready] : +# 95| r95_43(bool) = Call[await_ready] : func:r95_41, this:r95_39 +# 95| mu95_45(unknown) = ^CallSideEffect : ~m? +# 95| v95_47(void) = ^IndirectReadSideEffect[-1] : &:r95_39, ~m? -# 95| Block 15 -# 95| r95_57(glval) = VariableAddress[(unnamed local variable)] : -# 95| r95_58(glval) = FunctionAddress[unhandled_exception] : -# 95| v95_59(void) = Call[unhandled_exception] : func:r95_58, this:r95_57 -# 95| mu95_60(unknown) = ^CallSideEffect : ~m? -# 95| v95_61(void) = ^IndirectReadSideEffect[-1] : &:r95_57, ~m? -# 95| mu95_62(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_57 -#-----| Goto -> Block 16 +#-----| Block 7 +#-----| v0_22(void) = CatchAny : +#-----| r0_23(glval) = VariableAddress : +#-----| r0_24(bool) = Load[?] : &:r0_23, ~m? +#-----| r0_25(bool) = LogicalNot : r0_24 +#-----| v0_26(void) = ConditionalBranch : r0_25 +#-----| False -> Block 9 +#-----| True -> Block 8 + +#-----| Block 8 +#-----| v0_27(void) = ReThrow : +#-----| Exception -> Block 2 + +# 95| Block 9 +# 95| r95_49(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_50(glval) = FunctionAddress[unhandled_exception] : +# 95| v95_51(void) = Call[unhandled_exception] : func:r95_50, this:r95_49 +# 95| mu95_52(unknown) = ^CallSideEffect : ~m? +# 95| v95_53(void) = ^IndirectReadSideEffect[-1] : &:r95_49, ~m? +# 95| mu95_54(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_49 +#-----| Goto -> Block 10 -#-----| Block 16 -#-----| v0_27(void) = NoOp : +#-----| Block 10 +#-----| v0_28(void) = NoOp : +# 95| r95_55(glval) = VariableAddress[(unnamed local variable)] : +# 95| r95_56(glval) = FunctionAddress[final_suspend] : +# 95| r95_57(suspend_always) = Call[final_suspend] : func:r95_56, this:r95_55 +# 95| mu95_58(unknown) = ^CallSideEffect : ~m? +# 95| v95_59(void) = ^IndirectReadSideEffect[-1] : &:r95_55, ~m? +# 95| mu95_60(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_55 +#-----| v0_29(void) = CopyValue : r95_57 +# 95| r95_61(glval) = VariableAddress[#return] : +# 95| v95_62(void) = ReturnValue : &:r95_61, ~m? +#-----| Goto -> Block 1 # 99| co_returnable_value co_yield_value_value(int) # 99| (no string representation) @@ -1404,40 +1382,24 @@ coroutines.cpp: #-----| IndirectReadSideEffect: (const suspend_always)... # 99| Block 0 -# 99| v99_1(void) = EnterFunction : -# 99| mu99_2(unknown) = AliasedDefinition : -# 99| mu99_3(unknown) = InitializeNonLocal : -# 99| r99_4(glval) = VariableAddress[i] : -# 99| mu99_5(int) = InitializeParameter[i] : &:r99_4 -#-----| r0_1(glval) = VariableAddress[i] : -#-----| r0_2(glval) = VariableAddress[i] : -#-----| r0_3(int) = Load[i] : &:r0_2, ~m? -#-----| mu0_4(int) = Store[i] : &:r0_1, r0_3 -# 99| r99_6(glval) = VariableAddress[(unnamed local variable)] : -# 99| mu99_7(promise_type) = Uninitialized[(unnamed local variable)] : &:r99_6 - -# 99| Block 1 -# 99| v99_8(void) = AliasedUse : ~m? -# 99| v99_9(void) = ExitFunction : - -# 99| Block 2 -# 99| r99_10(glval) = VariableAddress[#return] : -# 99| v99_11(void) = ReturnValue : &:r99_10, ~m? -#-----| Goto -> Block 1 - -# 99| Block 3 -# 99| v99_12(void) = Unwind : -#-----| Goto -> Block 1 - -# 99| Block 4 -# 99| r99_13(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_15(glval) = FunctionAddress[initial_suspend] : -# 99| r99_17(suspend_always) = Call[initial_suspend] : func:r99_15, this:r99_13 -# 99| mu99_19(unknown) = ^CallSideEffect : ~m? -# 99| v99_21(void) = ^IndirectReadSideEffect[-1] : &:r99_13, ~m? -# 99| mu99_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_13 - -# 100| Block 4 +# 99| v99_1(void) = EnterFunction : +# 99| mu99_2(unknown) = AliasedDefinition : +# 99| mu99_3(unknown) = InitializeNonLocal : +# 99| r99_4(glval) = VariableAddress[i] : +# 99| mu99_5(int) = InitializeParameter[i] : &:r99_4 +#-----| r0_1(glval) = VariableAddress[i] : +#-----| r0_2(glval) = VariableAddress[i] : +#-----| r0_3(int) = Load[i] : &:r0_2, ~m? +#-----| mu0_4(int) = Store[i] : &:r0_1, r0_3 +# 99| r99_6(glval) = VariableAddress[(unnamed local variable)] : +# 99| mu99_7(promise_type) = Uninitialized[(unnamed local variable)] : &:r99_6 +# 99| r99_8(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_9(glval) = FunctionAddress[initial_suspend] : +# 99| r99_10(suspend_always) = Call[initial_suspend] : func:r99_9, this:r99_8 +# 99| mu99_11(unknown) = ^CallSideEffect : ~m? +# 99| v99_12(void) = ^IndirectReadSideEffect[-1] : &:r99_8, ~m? +# 99| mu99_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_8 +#-----| v0_5(void) = CopyValue : r99_10 # 100| r100_1(glval) = VariableAddress[(unnamed local variable)] : # 100| r100_2(glval) = FunctionAddress[yield_value] : # 100| r100_3(glval) = VariableAddress[i] : @@ -1446,103 +1408,118 @@ coroutines.cpp: # 100| mu100_6(unknown) = ^CallSideEffect : ~m? # 100| v100_7(void) = ^IndirectReadSideEffect[-1] : &:r100_1, ~m? # 100| mu100_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_1 +# 100| v100_9(void) = CopyValue : r100_5 +#-----| Goto -> Block 10 -# 99| Block 4 -# 99| r99_13(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_15(glval) = FunctionAddress[final_suspend] : -# 99| r99_17(suspend_always) = Call[final_suspend] : func:r99_15, this:r99_13 -# 99| mu99_19(unknown) = ^CallSideEffect : ~m? -# 99| v99_21(void) = ^IndirectReadSideEffect[-1] : &:r99_13, ~m? -# 99| mu99_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_13 +# 99| Block 1 +# 99| v99_14(void) = AliasedUse : ~m? +# 99| v99_15(void) = ExitFunction : -#-----| Block 7 -#-----| r0_5(bool) = Constant[1] : -#-----| r0_6(glval) = VariableAddress : -#-----| mu0_7(bool) = Store[?] : &:r0_6, r0_5 +# 99| Block 2 +# 99| v99_16(void) = Unwind : +#-----| Goto -> Block 1 -#-----| Block 8 -#-----| r0_8(glval) = VariableAddress[#temp0:0] : -# 99| r99_25(glval) = VariableAddress[#temp99:21] : -# 99| r99_27(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_29(glval) = FunctionAddress[initial_suspend] : -# 99| r99_31(suspend_always) = Call[initial_suspend] : func:r99_29, this:r99_27 -# 99| mu99_33(unknown) = ^CallSideEffect : ~m? -# 99| v99_35(void) = ^IndirectReadSideEffect[-1] : &:r99_27, ~m? -# 99| mu99_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_27 -# 99| mu99_39(suspend_always) = Store[#temp99:21] : &:r99_25, r99_31 -# 99| r99_41(suspend_always *) = CopyValue : r99_25 -# 99| mu99_43(suspend_always *) = Store[#temp0:0] : &:r0_8, r99_41 -#-----| r0_11(suspend_always *) = Load[#temp0:0] : &:r0_8, ~m? -# 99| r99_45(glval) = CopyValue : r0_11 -# 99| r99_47(glval) = Convert : r99_45 -# 99| r99_49(glval) = FunctionAddress[await_ready] : -# 99| r99_51(bool) = Call[await_ready] : func:r99_49, this:r99_47 -# 99| mu99_53(unknown) = ^CallSideEffect : ~m? -# 99| v99_55(void) = ^IndirectReadSideEffect[-1] : &:r99_47, ~m? +#-----| Block 3 +#-----| r0_6(bool) = Constant[1] : +#-----| r0_7(glval) = VariableAddress : +#-----| mu0_8(bool) = Store[?] : &:r0_7, r0_6 -#-----| Block 8 -#-----| r0_8(glval) = VariableAddress[#temp0:0] : -# 100| r100_9(glval) = VariableAddress[#temp100:13] : -# 100| r100_10(glval) = VariableAddress[(unnamed local variable)] : -# 100| r100_11(glval) = FunctionAddress[yield_value] : -# 100| r100_12(glval) = VariableAddress[i] : -# 100| r100_13(int) = Load[i] : &:r100_12, ~m? -# 100| r100_14(suspend_always) = Call[yield_value] : func:r100_11, this:r100_10, 0:r100_13 -# 100| mu100_15(unknown) = ^CallSideEffect : ~m? -# 100| v100_16(void) = ^IndirectReadSideEffect[-1] : &:r100_10, ~m? -# 100| mu100_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_10 -# 100| mu100_18(suspend_always) = Store[#temp100:13] : &:r100_9, r100_14 -# 100| r100_19(suspend_always *) = CopyValue : r100_9 -# 100| mu100_20(suspend_always *) = Store[#temp0:0] : &:r0_8, r100_19 -#-----| r0_13(suspend_always *) = Load[#temp0:0] : &:r0_8, ~m? -# 100| r100_21(glval) = CopyValue : r0_13 -# 100| r100_22(glval) = Convert : r100_21 -# 100| r100_23(glval) = FunctionAddress[await_ready] : -# 100| r100_24(bool) = Call[await_ready] : func:r100_23, this:r100_22 -# 100| mu100_25(unknown) = ^CallSideEffect : ~m? -# 100| v100_26(void) = ^IndirectReadSideEffect[-1] : &:r100_22, ~m? +#-----| Block 4 +#-----| r0_9(glval) = VariableAddress[#temp0:0] : +# 99| r99_17(glval) = VariableAddress[#temp99:21] : +# 99| r99_19(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_21(glval) = FunctionAddress[initial_suspend] : +# 99| r99_23(suspend_always) = Call[initial_suspend] : func:r99_21, this:r99_19 +# 99| mu99_25(unknown) = ^CallSideEffect : ~m? +# 99| v99_27(void) = ^IndirectReadSideEffect[-1] : &:r99_19, ~m? +# 99| mu99_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_19 +# 99| mu99_31(suspend_always) = Store[#temp99:21] : &:r99_17, r99_23 +# 99| r99_33(suspend_always *) = CopyValue : r99_17 +# 99| mu99_35(suspend_always *) = Store[#temp0:0] : &:r0_9, r99_33 +#-----| r0_12(suspend_always *) = Load[#temp0:0] : &:r0_9, ~m? +# 99| r99_37(glval) = CopyValue : r0_12 +# 99| r99_39(glval) = Convert : r99_37 +# 99| r99_41(glval) = FunctionAddress[await_ready] : +# 99| r99_43(bool) = Call[await_ready] : func:r99_41, this:r99_39 +# 99| mu99_45(unknown) = ^CallSideEffect : ~m? +# 99| v99_47(void) = ^IndirectReadSideEffect[-1] : &:r99_39, ~m? + +#-----| Block 4 +#-----| r0_9(glval) = VariableAddress[#temp0:0] : +# 100| r100_10(glval) = VariableAddress[#temp100:13] : +# 100| r100_11(glval) = VariableAddress[(unnamed local variable)] : +# 100| r100_12(glval) = FunctionAddress[yield_value] : +# 100| r100_13(glval) = VariableAddress[i] : +# 100| r100_14(int) = Load[i] : &:r100_13, ~m? +# 100| r100_15(suspend_always) = Call[yield_value] : func:r100_12, this:r100_11, 0:r100_14 +# 100| mu100_16(unknown) = ^CallSideEffect : ~m? +# 100| v100_17(void) = ^IndirectReadSideEffect[-1] : &:r100_11, ~m? +# 100| mu100_18(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r100_11 +# 100| mu100_19(suspend_always) = Store[#temp100:13] : &:r100_10, r100_15 +# 100| r100_20(suspend_always *) = CopyValue : r100_10 +# 100| mu100_21(suspend_always *) = Store[#temp0:0] : &:r0_9, r100_20 +#-----| r0_14(suspend_always *) = Load[#temp0:0] : &:r0_9, ~m? +# 100| r100_22(glval) = CopyValue : r0_14 +# 100| r100_23(glval) = Convert : r100_22 +# 100| r100_24(glval) = FunctionAddress[await_ready] : +# 100| r100_25(bool) = Call[await_ready] : func:r100_24, this:r100_23 +# 100| mu100_26(unknown) = ^CallSideEffect : ~m? +# 100| v100_27(void) = ^IndirectReadSideEffect[-1] : &:r100_23, ~m? + +#-----| Block 4 +#-----| r0_9(glval) = VariableAddress[#temp0:0] : +# 99| r99_17(glval) = VariableAddress[#temp99:21] : +# 99| r99_19(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_21(glval) = FunctionAddress[final_suspend] : +# 99| r99_23(suspend_always) = Call[final_suspend] : func:r99_21, this:r99_19 +# 99| mu99_25(unknown) = ^CallSideEffect : ~m? +# 99| v99_27(void) = ^IndirectReadSideEffect[-1] : &:r99_19, ~m? +# 99| mu99_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_19 +# 99| mu99_31(suspend_always) = Store[#temp99:21] : &:r99_17, r99_23 +# 99| r99_33(suspend_always *) = CopyValue : r99_17 +# 99| mu99_35(suspend_always *) = Store[#temp0:0] : &:r0_9, r99_33 +#-----| r0_12(suspend_always *) = Load[#temp0:0] : &:r0_9, ~m? +# 99| r99_37(glval) = CopyValue : r0_12 +# 99| r99_39(glval) = Convert : r99_37 +# 99| r99_41(glval) = FunctionAddress[await_ready] : +# 99| r99_43(bool) = Call[await_ready] : func:r99_41, this:r99_39 +# 99| mu99_45(unknown) = ^CallSideEffect : ~m? +# 99| v99_47(void) = ^IndirectReadSideEffect[-1] : &:r99_39, ~m? + +#-----| Block 7 +#-----| v0_15(void) = CatchAny : +#-----| r0_16(glval) = VariableAddress : +#-----| r0_17(bool) = Load[?] : &:r0_16, ~m? +#-----| r0_18(bool) = LogicalNot : r0_17 +#-----| v0_19(void) = ConditionalBranch : r0_18 +#-----| False -> Block 9 +#-----| True -> Block 8 #-----| Block 8 -#-----| r0_8(glval) = VariableAddress[#temp0:0] : -# 99| r99_25(glval) = VariableAddress[#temp99:21] : -# 99| r99_27(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_29(glval) = FunctionAddress[final_suspend] : -# 99| r99_31(suspend_always) = Call[final_suspend] : func:r99_29, this:r99_27 -# 99| mu99_33(unknown) = ^CallSideEffect : ~m? -# 99| v99_35(void) = ^IndirectReadSideEffect[-1] : &:r99_27, ~m? -# 99| mu99_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_27 -# 99| mu99_39(suspend_always) = Store[#temp99:21] : &:r99_25, r99_31 -# 99| r99_41(suspend_always *) = CopyValue : r99_25 -# 99| mu99_43(suspend_always *) = Store[#temp0:0] : &:r0_8, r99_41 -#-----| r0_11(suspend_always *) = Load[#temp0:0] : &:r0_8, ~m? -# 99| r99_45(glval) = CopyValue : r0_11 -# 99| r99_47(glval) = Convert : r99_45 -# 99| r99_49(glval) = FunctionAddress[await_ready] : -# 99| r99_51(bool) = Call[await_ready] : func:r99_49, this:r99_47 -# 99| mu99_53(unknown) = ^CallSideEffect : ~m? -# 99| v99_55(void) = ^IndirectReadSideEffect[-1] : &:r99_47, ~m? - -#-----| Block 11 -#-----| v0_14(void) = CatchAny : -#-----| r0_15(glval) = VariableAddress : -#-----| r0_16(bool) = Load[?] : &:r0_15, ~m? -#-----| r0_17(bool) = LogicalNot : r0_16 -#-----| v0_18(void) = ConditionalBranch : r0_17 -#-----| False -> Block 13 -#-----| True -> Block 12 +#-----| v0_20(void) = ReThrow : +#-----| Exception -> Block 2 -#-----| Block 12 -#-----| v0_19(void) = ReThrow : -#-----| Exception -> Block 3 +# 99| Block 9 +# 99| r99_49(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_50(glval) = FunctionAddress[unhandled_exception] : +# 99| v99_51(void) = Call[unhandled_exception] : func:r99_50, this:r99_49 +# 99| mu99_52(unknown) = ^CallSideEffect : ~m? +# 99| v99_53(void) = ^IndirectReadSideEffect[-1] : &:r99_49, ~m? +# 99| mu99_54(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_49 +#-----| Goto -> Block 10 -# 99| Block 13 -# 99| r99_57(glval) = VariableAddress[(unnamed local variable)] : -# 99| r99_58(glval) = FunctionAddress[unhandled_exception] : -# 99| v99_59(void) = Call[unhandled_exception] : func:r99_58, this:r99_57 -# 99| mu99_60(unknown) = ^CallSideEffect : ~m? -# 99| v99_61(void) = ^IndirectReadSideEffect[-1] : &:r99_57, ~m? -# 99| mu99_62(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_57 -#-----| v0_20(void) = NoOp : +#-----| Block 10 +#-----| v0_21(void) = NoOp : +# 99| r99_55(glval) = VariableAddress[(unnamed local variable)] : +# 99| r99_56(glval) = FunctionAddress[final_suspend] : +# 99| r99_57(suspend_always) = Call[final_suspend] : func:r99_56, this:r99_55 +# 99| mu99_58(unknown) = ^CallSideEffect : ~m? +# 99| v99_59(void) = ^IndirectReadSideEffect[-1] : &:r99_55, ~m? +# 99| mu99_60(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_55 +#-----| v0_22(void) = CopyValue : r99_57 +# 99| r99_61(glval) = VariableAddress[#return] : +# 99| v99_62(void) = ReturnValue : &:r99_61, ~m? +#-----| Goto -> Block 1 # 103| co_returnable_void co_yield_and_return_void(int) # 103| (no string representation) @@ -1639,29 +1616,13 @@ coroutines.cpp: #-----| mu0_4(int) = Store[i] : &:r0_1, r0_3 # 103| r103_6(glval) = VariableAddress[(unnamed local variable)] : # 103| mu103_7(promise_type) = Uninitialized[(unnamed local variable)] : &:r103_6 - -# 103| Block 1 -# 103| v103_8(void) = AliasedUse : ~m? -# 103| v103_9(void) = ExitFunction : - -# 103| Block 2 -# 103| r103_10(glval) = VariableAddress[#return] : -# 103| v103_11(void) = ReturnValue : &:r103_10, ~m? -#-----| Goto -> Block 1 - -# 103| Block 3 -# 103| v103_12(void) = Unwind : -#-----| Goto -> Block 1 - -# 103| Block 4 -# 103| r103_13(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_15(glval) = FunctionAddress[initial_suspend] : -# 103| r103_17(suspend_always) = Call[initial_suspend] : func:r103_15, this:r103_13 -# 103| mu103_19(unknown) = ^CallSideEffect : ~m? -# 103| v103_21(void) = ^IndirectReadSideEffect[-1] : &:r103_13, ~m? -# 103| mu103_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_13 - -# 104| Block 4 +# 103| r103_8(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_9(glval) = FunctionAddress[initial_suspend] : +# 103| r103_10(suspend_always) = Call[initial_suspend] : func:r103_9, this:r103_8 +# 103| mu103_11(unknown) = ^CallSideEffect : ~m? +# 103| v103_12(void) = ^IndirectReadSideEffect[-1] : &:r103_8, ~m? +# 103| mu103_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_8 +#-----| v0_5(void) = CopyValue : r103_10 # 104| r104_1(glval) = VariableAddress[(unnamed local variable)] : # 104| r104_2(glval) = FunctionAddress[yield_value] : # 104| r104_3(glval) = VariableAddress[i] : @@ -1670,118 +1631,126 @@ coroutines.cpp: # 104| mu104_6(unknown) = ^CallSideEffect : ~m? # 104| v104_7(void) = ^IndirectReadSideEffect[-1] : &:r104_1, ~m? # 104| mu104_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_1 +# 104| v104_9(void) = CopyValue : r104_5 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_void] : +#-----| v0_8(void) = Call[return_void] : func:r0_7, this:r0_6 +#-----| mu0_9(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_6, ~m? +#-----| mu0_11(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +# 105| v105_1(void) = NoOp : +#-----| v0_12(void) = NoOp : +#-----| Goto (back edge) -> Block 10 -#-----| Block 4 -#-----| r0_5(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_6(glval) = FunctionAddress[return_void] : -#-----| v0_7(void) = Call[return_void] : func:r0_6, this:r0_5 -#-----| mu0_8(unknown) = ^CallSideEffect : ~m? -#-----| v0_9(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -#-----| mu0_10(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_5 - -# 103| Block 4 -# 103| r103_13(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_15(glval) = FunctionAddress[final_suspend] : -# 103| r103_17(suspend_always) = Call[final_suspend] : func:r103_15, this:r103_13 -# 103| mu103_19(unknown) = ^CallSideEffect : ~m? -# 103| v103_21(void) = ^IndirectReadSideEffect[-1] : &:r103_13, ~m? -# 103| mu103_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_13 +# 103| Block 1 +# 103| v103_14(void) = AliasedUse : ~m? +# 103| v103_15(void) = ExitFunction : -#-----| Block 8 -#-----| r0_11(bool) = Constant[1] : -#-----| r0_12(glval) = VariableAddress : -#-----| mu0_13(bool) = Store[?] : &:r0_12, r0_11 +# 103| Block 2 +# 103| v103_16(void) = Unwind : +#-----| Goto -> Block 1 -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 103| r103_25(glval) = VariableAddress[#temp103:20] : -# 103| r103_27(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_29(glval) = FunctionAddress[initial_suspend] : -# 103| r103_31(suspend_always) = Call[initial_suspend] : func:r103_29, this:r103_27 -# 103| mu103_33(unknown) = ^CallSideEffect : ~m? -# 103| v103_35(void) = ^IndirectReadSideEffect[-1] : &:r103_27, ~m? -# 103| mu103_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_27 -# 103| mu103_39(suspend_always) = Store[#temp103:20] : &:r103_25, r103_31 -# 103| r103_41(suspend_always *) = CopyValue : r103_25 -# 103| mu103_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r103_41 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 103| r103_45(glval) = CopyValue : r0_17 -# 103| r103_47(glval) = Convert : r103_45 -# 103| r103_49(glval) = FunctionAddress[await_ready] : -# 103| r103_51(bool) = Call[await_ready] : func:r103_49, this:r103_47 -# 103| mu103_53(unknown) = ^CallSideEffect : ~m? -# 103| v103_55(void) = ^IndirectReadSideEffect[-1] : &:r103_47, ~m? +#-----| Block 3 +#-----| r0_13(bool) = Constant[1] : +#-----| r0_14(glval) = VariableAddress : +#-----| mu0_15(bool) = Store[?] : &:r0_14, r0_13 -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 104| r104_9(glval) = VariableAddress[#temp104:13] : -# 104| r104_10(glval) = VariableAddress[(unnamed local variable)] : -# 104| r104_11(glval) = FunctionAddress[yield_value] : -# 104| r104_12(glval) = VariableAddress[i] : -# 104| r104_13(int) = Load[i] : &:r104_12, ~m? -# 104| r104_14(suspend_always) = Call[yield_value] : func:r104_11, this:r104_10, 0:r104_13 -# 104| mu104_15(unknown) = ^CallSideEffect : ~m? -# 104| v104_16(void) = ^IndirectReadSideEffect[-1] : &:r104_10, ~m? -# 104| mu104_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_10 -# 104| mu104_18(suspend_always) = Store[#temp104:13] : &:r104_9, r104_14 -# 104| r104_19(suspend_always *) = CopyValue : r104_9 -# 104| mu104_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r104_19 -#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 104| r104_21(glval) = CopyValue : r0_19 -# 104| r104_22(glval) = Convert : r104_21 -# 104| r104_23(glval) = FunctionAddress[await_ready] : -# 104| r104_24(bool) = Call[await_ready] : func:r104_23, this:r104_22 -# 104| mu104_25(unknown) = ^CallSideEffect : ~m? -# 104| v104_26(void) = ^IndirectReadSideEffect[-1] : &:r104_22, ~m? +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 103| r103_17(glval) = VariableAddress[#temp103:20] : +# 103| r103_19(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_21(glval) = FunctionAddress[initial_suspend] : +# 103| r103_23(suspend_always) = Call[initial_suspend] : func:r103_21, this:r103_19 +# 103| mu103_25(unknown) = ^CallSideEffect : ~m? +# 103| v103_27(void) = ^IndirectReadSideEffect[-1] : &:r103_19, ~m? +# 103| mu103_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_19 +# 103| mu103_31(suspend_always) = Store[#temp103:20] : &:r103_17, r103_23 +# 103| r103_33(suspend_always *) = CopyValue : r103_17 +# 103| mu103_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r103_33 +#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 103| r103_37(glval) = CopyValue : r0_19 +# 103| r103_39(glval) = Convert : r103_37 +# 103| r103_41(glval) = FunctionAddress[await_ready] : +# 103| r103_43(bool) = Call[await_ready] : func:r103_41, this:r103_39 +# 103| mu103_45(unknown) = ^CallSideEffect : ~m? +# 103| v103_47(void) = ^IndirectReadSideEffect[-1] : &:r103_39, ~m? -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 103| r103_25(glval) = VariableAddress[#temp103:20] : -# 103| r103_27(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_29(glval) = FunctionAddress[final_suspend] : -# 103| r103_31(suspend_always) = Call[final_suspend] : func:r103_29, this:r103_27 -# 103| mu103_33(unknown) = ^CallSideEffect : ~m? -# 103| v103_35(void) = ^IndirectReadSideEffect[-1] : &:r103_27, ~m? -# 103| mu103_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_27 -# 103| mu103_39(suspend_always) = Store[#temp103:20] : &:r103_25, r103_31 -# 103| r103_41(suspend_always *) = CopyValue : r103_25 -# 103| mu103_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r103_41 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 103| r103_45(glval) = CopyValue : r0_17 -# 103| r103_47(glval) = Convert : r103_45 -# 103| r103_49(glval) = FunctionAddress[await_ready] : -# 103| r103_51(bool) = Call[await_ready] : func:r103_49, this:r103_47 -# 103| mu103_53(unknown) = ^CallSideEffect : ~m? -# 103| v103_55(void) = ^IndirectReadSideEffect[-1] : &:r103_47, ~m? - -#-----| Block 12 -#-----| v0_20(void) = NoOp : -#-----| Goto (back edge) -> Block 16 - -#-----| Block 13 -#-----| v0_21(void) = CatchAny : -#-----| r0_22(glval) = VariableAddress : -#-----| r0_23(bool) = Load[?] : &:r0_22, ~m? -#-----| r0_24(bool) = LogicalNot : r0_23 -#-----| v0_25(void) = ConditionalBranch : r0_24 -#-----| False -> Block 15 -#-----| True -> Block 14 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 104| r104_10(glval) = VariableAddress[#temp104:13] : +# 104| r104_11(glval) = VariableAddress[(unnamed local variable)] : +# 104| r104_12(glval) = FunctionAddress[yield_value] : +# 104| r104_13(glval) = VariableAddress[i] : +# 104| r104_14(int) = Load[i] : &:r104_13, ~m? +# 104| r104_15(suspend_always) = Call[yield_value] : func:r104_12, this:r104_11, 0:r104_14 +# 104| mu104_16(unknown) = ^CallSideEffect : ~m? +# 104| v104_17(void) = ^IndirectReadSideEffect[-1] : &:r104_11, ~m? +# 104| mu104_18(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r104_11 +# 104| mu104_19(suspend_always) = Store[#temp104:13] : &:r104_10, r104_15 +# 104| r104_20(suspend_always *) = CopyValue : r104_10 +# 104| mu104_21(suspend_always *) = Store[#temp0:0] : &:r0_16, r104_20 +#-----| r0_21(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 104| r104_22(glval) = CopyValue : r0_21 +# 104| r104_23(glval) = Convert : r104_22 +# 104| r104_24(glval) = FunctionAddress[await_ready] : +# 104| r104_25(bool) = Call[await_ready] : func:r104_24, this:r104_23 +# 104| mu104_26(unknown) = ^CallSideEffect : ~m? +# 104| v104_27(void) = ^IndirectReadSideEffect[-1] : &:r104_23, ~m? -#-----| Block 14 -#-----| v0_26(void) = ReThrow : -#-----| Exception -> Block 3 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 103| r103_17(glval) = VariableAddress[#temp103:20] : +# 103| r103_19(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_21(glval) = FunctionAddress[final_suspend] : +# 103| r103_23(suspend_always) = Call[final_suspend] : func:r103_21, this:r103_19 +# 103| mu103_25(unknown) = ^CallSideEffect : ~m? +# 103| v103_27(void) = ^IndirectReadSideEffect[-1] : &:r103_19, ~m? +# 103| mu103_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_19 +# 103| mu103_31(suspend_always) = Store[#temp103:20] : &:r103_17, r103_23 +# 103| r103_33(suspend_always *) = CopyValue : r103_17 +# 103| mu103_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r103_33 +#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 103| r103_37(glval) = CopyValue : r0_19 +# 103| r103_39(glval) = Convert : r103_37 +# 103| r103_41(glval) = FunctionAddress[await_ready] : +# 103| r103_43(bool) = Call[await_ready] : func:r103_41, this:r103_39 +# 103| mu103_45(unknown) = ^CallSideEffect : ~m? +# 103| v103_47(void) = ^IndirectReadSideEffect[-1] : &:r103_39, ~m? -# 103| Block 15 -# 103| r103_57(glval) = VariableAddress[(unnamed local variable)] : -# 103| r103_58(glval) = FunctionAddress[unhandled_exception] : -# 103| v103_59(void) = Call[unhandled_exception] : func:r103_58, this:r103_57 -# 103| mu103_60(unknown) = ^CallSideEffect : ~m? -# 103| v103_61(void) = ^IndirectReadSideEffect[-1] : &:r103_57, ~m? -# 103| mu103_62(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_57 -#-----| Goto -> Block 16 +#-----| Block 7 +#-----| v0_22(void) = CatchAny : +#-----| r0_23(glval) = VariableAddress : +#-----| r0_24(bool) = Load[?] : &:r0_23, ~m? +#-----| r0_25(bool) = LogicalNot : r0_24 +#-----| v0_26(void) = ConditionalBranch : r0_25 +#-----| False -> Block 9 +#-----| True -> Block 8 + +#-----| Block 8 +#-----| v0_27(void) = ReThrow : +#-----| Exception -> Block 2 + +# 103| Block 9 +# 103| r103_49(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_50(glval) = FunctionAddress[unhandled_exception] : +# 103| v103_51(void) = Call[unhandled_exception] : func:r103_50, this:r103_49 +# 103| mu103_52(unknown) = ^CallSideEffect : ~m? +# 103| v103_53(void) = ^IndirectReadSideEffect[-1] : &:r103_49, ~m? +# 103| mu103_54(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_49 +#-----| Goto -> Block 10 -#-----| Block 16 -#-----| v0_27(void) = NoOp : +#-----| Block 10 +#-----| v0_28(void) = NoOp : +# 103| r103_55(glval) = VariableAddress[(unnamed local variable)] : +# 103| r103_56(glval) = FunctionAddress[final_suspend] : +# 103| r103_57(suspend_always) = Call[final_suspend] : func:r103_56, this:r103_55 +# 103| mu103_58(unknown) = ^CallSideEffect : ~m? +# 103| v103_59(void) = ^IndirectReadSideEffect[-1] : &:r103_55, ~m? +# 103| mu103_60(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_55 +#-----| v0_29(void) = CopyValue : r103_57 +# 103| r103_61(glval) = VariableAddress[#return] : +# 103| v103_62(void) = ReturnValue : &:r103_61, ~m? +#-----| Goto -> Block 1 # 108| co_returnable_value co_yield_and_return_value(int) # 108| (no string representation) @@ -1878,29 +1847,13 @@ coroutines.cpp: #-----| mu0_4(int) = Store[i] : &:r0_1, r0_3 # 108| r108_6(glval) = VariableAddress[(unnamed local variable)] : # 108| mu108_7(promise_type) = Uninitialized[(unnamed local variable)] : &:r108_6 - -# 108| Block 1 -# 108| v108_8(void) = AliasedUse : ~m? -# 108| v108_9(void) = ExitFunction : - -# 108| Block 2 -# 108| r108_10(glval) = VariableAddress[#return] : -# 108| v108_11(void) = ReturnValue : &:r108_10, ~m? -#-----| Goto -> Block 1 - -# 108| Block 3 -# 108| v108_12(void) = Unwind : -#-----| Goto -> Block 1 - -# 108| Block 4 -# 108| r108_13(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_15(glval) = FunctionAddress[initial_suspend] : -# 108| r108_17(suspend_always) = Call[initial_suspend] : func:r108_15, this:r108_13 -# 108| mu108_19(unknown) = ^CallSideEffect : ~m? -# 108| v108_21(void) = ^IndirectReadSideEffect[-1] : &:r108_13, ~m? -# 108| mu108_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_13 - -# 109| Block 4 +# 108| r108_8(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_9(glval) = FunctionAddress[initial_suspend] : +# 108| r108_10(suspend_always) = Call[initial_suspend] : func:r108_9, this:r108_8 +# 108| mu108_11(unknown) = ^CallSideEffect : ~m? +# 108| v108_12(void) = ^IndirectReadSideEffect[-1] : &:r108_8, ~m? +# 108| mu108_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_8 +#-----| v0_5(void) = CopyValue : r108_10 # 109| r109_1(glval) = VariableAddress[(unnamed local variable)] : # 109| r109_2(glval) = FunctionAddress[yield_value] : # 109| r109_3(glval) = VariableAddress[i] : @@ -1909,122 +1862,130 @@ coroutines.cpp: # 109| mu109_6(unknown) = ^CallSideEffect : ~m? # 109| v109_7(void) = ^IndirectReadSideEffect[-1] : &:r109_1, ~m? # 109| mu109_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_1 +# 109| v109_9(void) = CopyValue : r109_5 +#-----| r0_6(glval) = VariableAddress[(unnamed local variable)] : +#-----| r0_7(glval) = FunctionAddress[return_value] : +# 110| r110_1(glval) = VariableAddress[i] : +# 110| r110_2(int) = Load[i] : &:r110_1, ~m? +# 110| r110_3(int) = Constant[1] : +# 110| r110_4(int) = Add : r110_2, r110_3 +#-----| v0_8(void) = Call[return_value] : func:r0_7, this:r0_6, 0:r110_4 +#-----| mu0_9(unknown) = ^CallSideEffect : ~m? +#-----| v0_10(void) = ^IndirectReadSideEffect[-1] : &:r0_6, ~m? +#-----| mu0_11(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6 +# 110| v110_5(void) = NoOp : +#-----| v0_12(void) = NoOp : +#-----| Goto (back edge) -> Block 10 -#-----| Block 4 -#-----| r0_5(glval) = VariableAddress[(unnamed local variable)] : -#-----| r0_6(glval) = FunctionAddress[return_value] : -# 110| r110_1(glval) = VariableAddress[i] : -# 110| r110_2(int) = Load[i] : &:r110_1, ~m? -# 110| r110_3(int) = Constant[1] : -# 110| r110_4(int) = Add : r110_2, r110_3 -#-----| v0_7(void) = Call[return_value] : func:r0_6, this:r0_5, 0:r110_4 -#-----| mu0_8(unknown) = ^CallSideEffect : ~m? -#-----| v0_9(void) = ^IndirectReadSideEffect[-1] : &:r0_5, ~m? -#-----| mu0_10(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_5 - -# 108| Block 4 -# 108| r108_13(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_15(glval) = FunctionAddress[final_suspend] : -# 108| r108_17(suspend_always) = Call[final_suspend] : func:r108_15, this:r108_13 -# 108| mu108_19(unknown) = ^CallSideEffect : ~m? -# 108| v108_21(void) = ^IndirectReadSideEffect[-1] : &:r108_13, ~m? -# 108| mu108_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_13 +# 108| Block 1 +# 108| v108_14(void) = AliasedUse : ~m? +# 108| v108_15(void) = ExitFunction : -#-----| Block 8 -#-----| r0_11(bool) = Constant[1] : -#-----| r0_12(glval) = VariableAddress : -#-----| mu0_13(bool) = Store[?] : &:r0_12, r0_11 +# 108| Block 2 +# 108| v108_16(void) = Unwind : +#-----| Goto -> Block 1 -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 108| r108_25(glval) = VariableAddress[#temp108:21] : -# 108| r108_27(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_29(glval) = FunctionAddress[initial_suspend] : -# 108| r108_31(suspend_always) = Call[initial_suspend] : func:r108_29, this:r108_27 -# 108| mu108_33(unknown) = ^CallSideEffect : ~m? -# 108| v108_35(void) = ^IndirectReadSideEffect[-1] : &:r108_27, ~m? -# 108| mu108_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_27 -# 108| mu108_39(suspend_always) = Store[#temp108:21] : &:r108_25, r108_31 -# 108| r108_41(suspend_always *) = CopyValue : r108_25 -# 108| mu108_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r108_41 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 108| r108_45(glval) = CopyValue : r0_17 -# 108| r108_47(glval) = Convert : r108_45 -# 108| r108_49(glval) = FunctionAddress[await_ready] : -# 108| r108_51(bool) = Call[await_ready] : func:r108_49, this:r108_47 -# 108| mu108_53(unknown) = ^CallSideEffect : ~m? -# 108| v108_55(void) = ^IndirectReadSideEffect[-1] : &:r108_47, ~m? +#-----| Block 3 +#-----| r0_13(bool) = Constant[1] : +#-----| r0_14(glval) = VariableAddress : +#-----| mu0_15(bool) = Store[?] : &:r0_14, r0_13 -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 109| r109_9(glval) = VariableAddress[#temp109:13] : -# 109| r109_10(glval) = VariableAddress[(unnamed local variable)] : -# 109| r109_11(glval) = FunctionAddress[yield_value] : -# 109| r109_12(glval) = VariableAddress[i] : -# 109| r109_13(int) = Load[i] : &:r109_12, ~m? -# 109| r109_14(suspend_always) = Call[yield_value] : func:r109_11, this:r109_10, 0:r109_13 -# 109| mu109_15(unknown) = ^CallSideEffect : ~m? -# 109| v109_16(void) = ^IndirectReadSideEffect[-1] : &:r109_10, ~m? -# 109| mu109_17(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_10 -# 109| mu109_18(suspend_always) = Store[#temp109:13] : &:r109_9, r109_14 -# 109| r109_19(suspend_always *) = CopyValue : r109_9 -# 109| mu109_20(suspend_always *) = Store[#temp0:0] : &:r0_14, r109_19 -#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 109| r109_21(glval) = CopyValue : r0_19 -# 109| r109_22(glval) = Convert : r109_21 -# 109| r109_23(glval) = FunctionAddress[await_ready] : -# 109| r109_24(bool) = Call[await_ready] : func:r109_23, this:r109_22 -# 109| mu109_25(unknown) = ^CallSideEffect : ~m? -# 109| v109_26(void) = ^IndirectReadSideEffect[-1] : &:r109_22, ~m? +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 108| r108_17(glval) = VariableAddress[#temp108:21] : +# 108| r108_19(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_21(glval) = FunctionAddress[initial_suspend] : +# 108| r108_23(suspend_always) = Call[initial_suspend] : func:r108_21, this:r108_19 +# 108| mu108_25(unknown) = ^CallSideEffect : ~m? +# 108| v108_27(void) = ^IndirectReadSideEffect[-1] : &:r108_19, ~m? +# 108| mu108_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_19 +# 108| mu108_31(suspend_always) = Store[#temp108:21] : &:r108_17, r108_23 +# 108| r108_33(suspend_always *) = CopyValue : r108_17 +# 108| mu108_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r108_33 +#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 108| r108_37(glval) = CopyValue : r0_19 +# 108| r108_39(glval) = Convert : r108_37 +# 108| r108_41(glval) = FunctionAddress[await_ready] : +# 108| r108_43(bool) = Call[await_ready] : func:r108_41, this:r108_39 +# 108| mu108_45(unknown) = ^CallSideEffect : ~m? +# 108| v108_47(void) = ^IndirectReadSideEffect[-1] : &:r108_39, ~m? -#-----| Block 9 -#-----| r0_14(glval) = VariableAddress[#temp0:0] : -# 108| r108_25(glval) = VariableAddress[#temp108:21] : -# 108| r108_27(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_29(glval) = FunctionAddress[final_suspend] : -# 108| r108_31(suspend_always) = Call[final_suspend] : func:r108_29, this:r108_27 -# 108| mu108_33(unknown) = ^CallSideEffect : ~m? -# 108| v108_35(void) = ^IndirectReadSideEffect[-1] : &:r108_27, ~m? -# 108| mu108_37(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_27 -# 108| mu108_39(suspend_always) = Store[#temp108:21] : &:r108_25, r108_31 -# 108| r108_41(suspend_always *) = CopyValue : r108_25 -# 108| mu108_43(suspend_always *) = Store[#temp0:0] : &:r0_14, r108_41 -#-----| r0_17(suspend_always *) = Load[#temp0:0] : &:r0_14, ~m? -# 108| r108_45(glval) = CopyValue : r0_17 -# 108| r108_47(glval) = Convert : r108_45 -# 108| r108_49(glval) = FunctionAddress[await_ready] : -# 108| r108_51(bool) = Call[await_ready] : func:r108_49, this:r108_47 -# 108| mu108_53(unknown) = ^CallSideEffect : ~m? -# 108| v108_55(void) = ^IndirectReadSideEffect[-1] : &:r108_47, ~m? - -#-----| Block 12 -#-----| v0_20(void) = NoOp : -#-----| Goto (back edge) -> Block 16 - -#-----| Block 13 -#-----| v0_21(void) = CatchAny : -#-----| r0_22(glval) = VariableAddress : -#-----| r0_23(bool) = Load[?] : &:r0_22, ~m? -#-----| r0_24(bool) = LogicalNot : r0_23 -#-----| v0_25(void) = ConditionalBranch : r0_24 -#-----| False -> Block 15 -#-----| True -> Block 14 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 109| r109_10(glval) = VariableAddress[#temp109:13] : +# 109| r109_11(glval) = VariableAddress[(unnamed local variable)] : +# 109| r109_12(glval) = FunctionAddress[yield_value] : +# 109| r109_13(glval) = VariableAddress[i] : +# 109| r109_14(int) = Load[i] : &:r109_13, ~m? +# 109| r109_15(suspend_always) = Call[yield_value] : func:r109_12, this:r109_11, 0:r109_14 +# 109| mu109_16(unknown) = ^CallSideEffect : ~m? +# 109| v109_17(void) = ^IndirectReadSideEffect[-1] : &:r109_11, ~m? +# 109| mu109_18(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r109_11 +# 109| mu109_19(suspend_always) = Store[#temp109:13] : &:r109_10, r109_15 +# 109| r109_20(suspend_always *) = CopyValue : r109_10 +# 109| mu109_21(suspend_always *) = Store[#temp0:0] : &:r0_16, r109_20 +#-----| r0_21(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 109| r109_22(glval) = CopyValue : r0_21 +# 109| r109_23(glval) = Convert : r109_22 +# 109| r109_24(glval) = FunctionAddress[await_ready] : +# 109| r109_25(bool) = Call[await_ready] : func:r109_24, this:r109_23 +# 109| mu109_26(unknown) = ^CallSideEffect : ~m? +# 109| v109_27(void) = ^IndirectReadSideEffect[-1] : &:r109_23, ~m? -#-----| Block 14 -#-----| v0_26(void) = ReThrow : -#-----| Exception -> Block 3 +#-----| Block 4 +#-----| r0_16(glval) = VariableAddress[#temp0:0] : +# 108| r108_17(glval) = VariableAddress[#temp108:21] : +# 108| r108_19(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_21(glval) = FunctionAddress[final_suspend] : +# 108| r108_23(suspend_always) = Call[final_suspend] : func:r108_21, this:r108_19 +# 108| mu108_25(unknown) = ^CallSideEffect : ~m? +# 108| v108_27(void) = ^IndirectReadSideEffect[-1] : &:r108_19, ~m? +# 108| mu108_29(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_19 +# 108| mu108_31(suspend_always) = Store[#temp108:21] : &:r108_17, r108_23 +# 108| r108_33(suspend_always *) = CopyValue : r108_17 +# 108| mu108_35(suspend_always *) = Store[#temp0:0] : &:r0_16, r108_33 +#-----| r0_19(suspend_always *) = Load[#temp0:0] : &:r0_16, ~m? +# 108| r108_37(glval) = CopyValue : r0_19 +# 108| r108_39(glval) = Convert : r108_37 +# 108| r108_41(glval) = FunctionAddress[await_ready] : +# 108| r108_43(bool) = Call[await_ready] : func:r108_41, this:r108_39 +# 108| mu108_45(unknown) = ^CallSideEffect : ~m? +# 108| v108_47(void) = ^IndirectReadSideEffect[-1] : &:r108_39, ~m? -# 108| Block 15 -# 108| r108_57(glval) = VariableAddress[(unnamed local variable)] : -# 108| r108_58(glval) = FunctionAddress[unhandled_exception] : -# 108| v108_59(void) = Call[unhandled_exception] : func:r108_58, this:r108_57 -# 108| mu108_60(unknown) = ^CallSideEffect : ~m? -# 108| v108_61(void) = ^IndirectReadSideEffect[-1] : &:r108_57, ~m? -# 108| mu108_62(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_57 -#-----| Goto -> Block 16 +#-----| Block 7 +#-----| v0_22(void) = CatchAny : +#-----| r0_23(glval) = VariableAddress : +#-----| r0_24(bool) = Load[?] : &:r0_23, ~m? +#-----| r0_25(bool) = LogicalNot : r0_24 +#-----| v0_26(void) = ConditionalBranch : r0_25 +#-----| False -> Block 9 +#-----| True -> Block 8 + +#-----| Block 8 +#-----| v0_27(void) = ReThrow : +#-----| Exception -> Block 2 + +# 108| Block 9 +# 108| r108_49(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_50(glval) = FunctionAddress[unhandled_exception] : +# 108| v108_51(void) = Call[unhandled_exception] : func:r108_50, this:r108_49 +# 108| mu108_52(unknown) = ^CallSideEffect : ~m? +# 108| v108_53(void) = ^IndirectReadSideEffect[-1] : &:r108_49, ~m? +# 108| mu108_54(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_49 +#-----| Goto -> Block 10 -#-----| Block 16 -#-----| v0_27(void) = NoOp : +#-----| Block 10 +#-----| v0_28(void) = NoOp : +# 108| r108_55(glval) = VariableAddress[(unnamed local variable)] : +# 108| r108_56(glval) = FunctionAddress[final_suspend] : +# 108| r108_57(suspend_always) = Call[final_suspend] : func:r108_56, this:r108_55 +# 108| mu108_58(unknown) = ^CallSideEffect : ~m? +# 108| v108_59(void) = ^IndirectReadSideEffect[-1] : &:r108_55, ~m? +# 108| mu108_60(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_55 +#-----| v0_29(void) = CopyValue : r108_57 +# 108| r108_61(glval) = VariableAddress[#return] : +# 108| v108_62(void) = ReturnValue : &:r108_61, ~m? +#-----| Goto -> Block 1 destructors_for_temps.cpp: # 9| void ClassWithConstructor::ClassWithConstructor(ClassWithConstructor&&) diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected index 208ab45aefab..b93c7d2649f8 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency.expected @@ -6,12 +6,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| coroutines.cpp:87:20:87:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | ambiguousSuccessors unexplainedLoop unnecessaryPhiInstruction diff --git a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected index 208ab45aefab..b93c7d2649f8 100644 --- a/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected +++ b/cpp/ql/test/library-tests/ir/ir/unaliased_ssa_consistency_unsound.expected @@ -6,12 +6,6 @@ missingOperandType duplicateChiOperand sideEffectWithoutPrimary instructionWithoutSuccessor -| coroutines.cpp:87:20:87:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:87:20:87:33 | co_returnable_void co_return_void() | co_returnable_void co_return_void() | -| coroutines.cpp:91:21:91:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:91:21:91:33 | co_returnable_value co_return_int(int) | co_returnable_value co_return_int(int) | -| coroutines.cpp:95:20:95:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:95:20:95:38 | co_returnable_void co_yield_value_void(int) | co_returnable_void co_yield_value_void(int) | -| coroutines.cpp:99:21:99:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:99:21:99:40 | co_returnable_value co_yield_value_value(int) | co_returnable_value co_yield_value_value(int) | -| coroutines.cpp:103:20:103:20 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:103:20:103:43 | co_returnable_void co_yield_and_return_void(int) | co_returnable_void co_yield_and_return_void(int) | -| coroutines.cpp:108:21:108:21 | Uninitialized: declaration of (unnamed local variable) | Instruction 'Uninitialized: declaration of (unnamed local variable)' has no successors in function '$@'. | coroutines.cpp:108:21:108:45 | co_returnable_value co_yield_and_return_value(int) | co_returnable_value co_yield_and_return_value(int) | ambiguousSuccessors unexplainedLoop unnecessaryPhiInstruction