Skip to content

Commit 2a91477

Browse files
committed
C++: Accept test changes.
1 parent d030f0b commit 2a91477

7 files changed

+595
-553
lines changed

cpp/ql/test/library-tests/ir/ir/aliased_ir.expected

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,34 @@ coroutines.cpp:
755755
# 87| v87_12(void) = ^IndirectReadSideEffect[-1] : &:r87_7, m87_6
756756
# 87| m87_13(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_7
757757
# 87| m87_14(promise_type) = Chi : total:m87_6, partial:m87_13
758+
#-----| v0_1(void) = CopyValue : r87_9
759+
#-----| r0_2(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
760+
#-----| r0_3(glval<unknown>) = FunctionAddress[return_void] :
761+
#-----| v0_4(void) = Call[return_void] : func:r0_3, this:r0_2
762+
#-----| m0_5(unknown) = ^CallSideEffect : ~m87_11
763+
#-----| m0_6(unknown) = Chi : total:m87_11, partial:m0_5
764+
#-----| v0_7(void) = ^IndirectReadSideEffect[-1] : &:r0_2, m87_14
765+
#-----| m0_8(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_2
766+
#-----| m0_9(promise_type) = Chi : total:m87_14, partial:m0_8
767+
# 88| v88_1(void) = NoOp :
768+
#-----| v0_10(void) = NoOp :
769+
#-----| Goto (back edge) -> Block 1
770+
771+
#-----| Block 1
772+
#-----| v0_11(void) = NoOp :
773+
# 87| r87_15(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
774+
# 87| r87_16(glval<unknown>) = FunctionAddress[final_suspend] :
775+
# 87| r87_17(suspend_always) = Call[final_suspend] : func:r87_16, this:r87_15
776+
# 87| m87_18(unknown) = ^CallSideEffect : ~m0_6
777+
# 87| m87_19(unknown) = Chi : total:m0_6, partial:m87_18
778+
# 87| v87_20(void) = ^IndirectReadSideEffect[-1] : &:r87_15, m0_9
779+
# 87| m87_21(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r87_15
780+
# 87| m87_22(promise_type) = Chi : total:m0_9, partial:m87_21
781+
#-----| v0_12(void) = CopyValue : r87_17
782+
# 87| r87_23(glval<co_returnable_void>) = VariableAddress[#return] :
783+
# 87| v87_24(void) = ReturnValue : &:r87_23, ~m87_19
784+
# 87| v87_25(void) = AliasedUse : ~m87_19
785+
# 87| v87_26(void) = ExitFunction :
758786

759787
# 91| co_returnable_value co_return_int(int)
760788
# 91| Block 0
@@ -778,6 +806,36 @@ coroutines.cpp:
778806
# 91| v91_14(void) = ^IndirectReadSideEffect[-1] : &:r91_9, m91_8
779807
# 91| m91_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_9
780808
# 91| m91_16(promise_type) = Chi : total:m91_8, partial:m91_15
809+
#-----| v0_5(void) = CopyValue : r91_11
810+
#-----| r0_6(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
811+
#-----| r0_7(glval<unknown>) = FunctionAddress[return_value] :
812+
# 92| r92_1(glval<int>) = VariableAddress[i] :
813+
# 92| r92_2(int) = Load[i] : &:r92_1, m0_4
814+
#-----| v0_8(void) = Call[return_value] : func:r0_7, this:r0_6, 0:r92_2
815+
#-----| m0_9(unknown) = ^CallSideEffect : ~m91_13
816+
#-----| m0_10(unknown) = Chi : total:m91_13, partial:m0_9
817+
#-----| v0_11(void) = ^IndirectReadSideEffect[-1] : &:r0_6, m91_16
818+
#-----| m0_12(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r0_6
819+
#-----| m0_13(promise_type) = Chi : total:m91_16, partial:m0_12
820+
# 92| v92_3(void) = NoOp :
821+
#-----| v0_14(void) = NoOp :
822+
#-----| Goto (back edge) -> Block 1
823+
824+
#-----| Block 1
825+
#-----| v0_15(void) = NoOp :
826+
# 91| r91_17(glval<promise_type>) = VariableAddress[(unnamed local variable)] :
827+
# 91| r91_18(glval<unknown>) = FunctionAddress[final_suspend] :
828+
# 91| r91_19(suspend_always) = Call[final_suspend] : func:r91_18, this:r91_17
829+
# 91| m91_20(unknown) = ^CallSideEffect : ~m0_10
830+
# 91| m91_21(unknown) = Chi : total:m0_10, partial:m91_20
831+
# 91| v91_22(void) = ^IndirectReadSideEffect[-1] : &:r91_17, m0_13
832+
# 91| m91_23(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r91_17
833+
# 91| m91_24(promise_type) = Chi : total:m0_13, partial:m91_23
834+
#-----| v0_16(void) = CopyValue : r91_19
835+
# 91| r91_25(glval<co_returnable_value>) = VariableAddress[#return] :
836+
# 91| v91_26(void) = ReturnValue : &:r91_25, ~m91_21
837+
# 91| v91_27(void) = AliasedUse : ~m91_21
838+
# 91| v91_28(void) = ExitFunction :
781839

782840
# 95| co_returnable_void co_yield_value_void(int)
783841
# 95| Block 0
@@ -801,6 +859,7 @@ coroutines.cpp:
801859
# 95| v95_14(void) = ^IndirectReadSideEffect[-1] : &:r95_9, m95_8
802860
# 95| m95_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r95_9
803861
# 95| m95_16(promise_type) = Chi : total:m95_8, partial:m95_15
862+
#-----| v0_5(void) = CopyValue : r95_11
804863

805864
# 99| co_returnable_value co_yield_value_value(int)
806865
# 99| Block 0
@@ -824,6 +883,7 @@ coroutines.cpp:
824883
# 99| v99_14(void) = ^IndirectReadSideEffect[-1] : &:r99_9, m99_8
825884
# 99| m99_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r99_9
826885
# 99| m99_16(promise_type) = Chi : total:m99_8, partial:m99_15
886+
#-----| v0_5(void) = CopyValue : r99_11
827887

828888
# 103| co_returnable_void co_yield_and_return_void(int)
829889
# 103| Block 0
@@ -847,6 +907,7 @@ coroutines.cpp:
847907
# 103| v103_14(void) = ^IndirectReadSideEffect[-1] : &:r103_9, m103_8
848908
# 103| m103_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r103_9
849909
# 103| m103_16(promise_type) = Chi : total:m103_8, partial:m103_15
910+
#-----| v0_5(void) = CopyValue : r103_11
850911

851912
# 108| co_returnable_value co_yield_and_return_value(int)
852913
# 108| Block 0
@@ -870,6 +931,7 @@ coroutines.cpp:
870931
# 108| v108_14(void) = ^IndirectReadSideEffect[-1] : &:r108_9, m108_8
871932
# 108| m108_15(promise_type) = ^IndirectMayWriteSideEffect[-1] : &:r108_9
872933
# 108| m108_16(promise_type) = Chi : total:m108_8, partial:m108_15
934+
#-----| v0_5(void) = CopyValue : r108_11
873935

874936
destructors_for_temps.cpp:
875937
# 9| void ClassWithConstructor::ClassWithConstructor(ClassWithConstructor&&)

cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency.expected

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ missingOperandType
66
duplicateChiOperand
77
sideEffectWithoutPrimary
88
instructionWithoutSuccessor
9-
| coroutines.cpp:87:20:87:20 | Chi: (unnamed local variable) | Instruction 'Chi: (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() |
10-
| coroutines.cpp:91:21:91:21 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
11-
| coroutines.cpp:95:20:95:20 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
12-
| coroutines.cpp:99:21:99:21 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
13-
| coroutines.cpp:103:20:103:20 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
14-
| coroutines.cpp:108:21:108:21 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
9+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
10+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
11+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
12+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
1513
ambiguousSuccessors
1614
unexplainedLoop
1715
unnecessaryPhiInstruction

cpp/ql/test/library-tests/ir/ir/aliased_ssa_consistency_unsound.expected

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ missingOperandType
66
duplicateChiOperand
77
sideEffectWithoutPrimary
88
instructionWithoutSuccessor
9-
| coroutines.cpp:87:20:87:20 | Chi: (unnamed local variable) | Instruction 'Chi: (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() |
10-
| coroutines.cpp:91:21:91:21 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
11-
| coroutines.cpp:95:20:95:20 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
12-
| coroutines.cpp:99:21:99:21 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
13-
| coroutines.cpp:103:20:103:20 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
14-
| coroutines.cpp:108:21:108:21 | Chi: (unnamed local variable) | Instruction 'Chi: (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) |
9+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
10+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
11+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
12+
| file://:0:0:0:0 | CopyValue: co_await ... | Instruction 'CopyValue: co_await ...' 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) |
1513
ambiguousSuccessors
1614
unexplainedLoop
1715
unnecessaryPhiInstruction

0 commit comments

Comments
 (0)