Skip to content

Commit 4c01c06

Browse files
committed
C++: Accept test changes.
1 parent f1d2dac commit 4c01c06

8 files changed

+101
-331
lines changed

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

Lines changed: 38 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -16028,69 +16028,44 @@ ir.cpp:
1602816028

1602916029
# 2443| void new_with_destructor(ClassWithDestructor)
1603016030
# 2443| Block 0
16031-
# 2443| v2443_1(void) = EnterFunction :
16032-
# 2443| m2443_2(unknown) = AliasedDefinition :
16033-
# 2443| m2443_3(unknown) = InitializeNonLocal :
16034-
# 2443| m2443_4(unknown) = Chi : total:m2443_2, partial:m2443_3
16035-
# 2443| r2443_5(glval<ClassWithDestructor>) = VariableAddress[a] :
16036-
# 2443| m2443_6(ClassWithDestructor) = InitializeParameter[a] : &:r2443_5
16037-
# 2445| r2445_1(glval<ByValueConstructor *>) = VariableAddress[b] :
16038-
# 2445| r2445_2(glval<unknown>) = FunctionAddress[operator new] :
16039-
# 2445| r2445_3(unsigned long) = Constant[1] :
16040-
#-----| Goto -> Block 4
16041-
#-----| Goto -> Block 4
16042-
16043-
# 2445| Block 1
16044-
# 2445| m2445_4(ByValueConstructor *) = Store[b] : &:r2445_1, r2445_5
16045-
# 2446| v2446_1(void) = NoOp :
16046-
# 2443| v2443_7(void) = ReturnVoid :
16047-
# 2443| v2443_8(void) = AliasedUse : ~m2445_31, ~m2445_45
16048-
# 2443| v2443_9(void) = ExitFunction :
16049-
16050-
# 2445| Block 2
16051-
# 2445| r2445_5(ByValueConstructor *) = Convert : r2445_17
16052-
# 2445| r2445_6(glval<unknown>) = FunctionAddress[ByValueConstructor] :
16053-
# 2445| r2445_7(glval<ClassWithDestructor>) = VariableAddress[#temp2445:52] :
16054-
# 2445| r2445_8(glval<ClassWithDestructor>) = VariableAddress[a] :
16055-
# 2445| r2445_9(ClassWithDestructor) = Load[a] : &:r2445_8, m2443_6
16056-
# 2445| m2445_10(ClassWithDestructor) = Store[#temp2445:52] : &:r2445_7, r2445_9
16057-
# 2445| r2445_11(ClassWithDestructor) = Load[#temp2445:52] : &:r2445_7, m2445_10
16058-
# 2445| v2445_12(void) = Call[ByValueConstructor] : func:r2445_6, this:r2445_5, 0:r2445_11
16059-
# 2445| m2445_13(unknown) = ^CallSideEffect : ~m2445_31, ~m2445_45
16060-
# 2445| m2445_14(unknown) = Chi : total:m2445_31, total:m2445_45, partial:m2445_13
16061-
# 2445| m2445_15(ByValueConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r2445_5
16062-
# 2445| m2445_16(unknown) = Chi : total:m2445_22, total:m2445_25, total:m2445_36, total:m2445_39, partial:m2445_15
16063-
#-----| Goto (back edge) -> Block 4
16064-
#-----| Goto (back edge) -> Block 4
16065-
16066-
# 2445| Block 3
16067-
# 2445| r2445_17(void *) = Call[operator new] : func:r2445_2, 0:r2445_3
16068-
# 2445| m2445_18(unknown) = ^CallSideEffect : ~m2445_31, ~m2445_45
16069-
# 2445| m2445_19(unknown) = Chi : total:m2445_31, total:m2445_45, partial:m2445_18
16070-
# 2445| m2445_20(unknown) = ^InitializeDynamicAllocation : &:r2445_17
16071-
#-----| Goto (back edge) -> Block 4
16072-
#-----| Goto (back edge) -> Block 4
16073-
16074-
# 2445| Block 4
16075-
# 2445| m2445_39(unknown) = Phi : from 2:m2445_16, from 3:m2445_20
16076-
# 2445| m2445_40(unknown) = Phi : from 0:~m2443_4, from 2:~m2445_14, from 3:~m2445_19
16077-
# 2445| m2445_38(ClassWithDestructor) = Phi : from 2:m2445_10, from 3:m2445_34, from 3:m2445_48
16078-
# 2445| r2445_41(glval<ClassWithDestructor>) = CopyValue : r2445_7
16079-
# 2445| r2445_42(glval<unknown>) = FunctionAddress[~ClassWithDestructor] :
16080-
# 2445| v2445_43(void) = Call[~ClassWithDestructor] : func:r2445_28, func:r2445_42, this:r2445_27, this:r2445_41
16081-
# 2445| m2445_44(unknown) = ^CallSideEffect : ~m2445_23, ~m2445_26, ~m2445_37, ~m2445_40
16082-
# 2445| m2445_45(unknown) = Chi : total:m2445_23, total:m2445_26, total:m2445_37, total:m2445_40, partial:m2445_30, partial:m2445_44
16083-
# 2445| v2445_46(void) = ^IndirectReadSideEffect[-1] : &:r2445_27, &:r2445_41, m2445_21, m2445_24, m2445_35, m2445_38
16084-
# 2445| m2445_47(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2445_27, &:r2445_41
16085-
# 2445| m2445_48(ClassWithDestructor) = Chi : total:m2445_21, total:m2445_24, total:m2445_35, total:m2445_38, partial:m2445_33, partial:m2445_47
16086-
#-----| Goto (back edge) -> Block 2
16087-
#-----| Goto (back edge) -> Block 3
16088-
#-----| Goto (back edge) -> Block 1
16089-
16090-
# 2445| Block 4
16091-
#-----| Goto (back edge) -> Block 2
16092-
#-----| Goto (back edge) -> Block 3
16093-
#-----| Goto (back edge) -> Block 1
16031+
# 2443| v2443_1(void) = EnterFunction :
16032+
# 2443| m2443_2(unknown) = AliasedDefinition :
16033+
# 2443| m2443_3(unknown) = InitializeNonLocal :
16034+
# 2443| m2443_4(unknown) = Chi : total:m2443_2, partial:m2443_3
16035+
# 2443| r2443_5(glval<ClassWithDestructor>) = VariableAddress[a] :
16036+
# 2443| m2443_6(ClassWithDestructor) = InitializeParameter[a] : &:r2443_5
16037+
# 2445| r2445_1(glval<ByValueConstructor *>) = VariableAddress[b] :
16038+
# 2445| r2445_2(glval<unknown>) = FunctionAddress[operator new] :
16039+
# 2445| r2445_3(unsigned long) = Constant[1] :
16040+
# 2445| r2445_4(void *) = Call[operator new] : func:r2445_2, 0:r2445_3
16041+
# 2445| m2445_5(unknown) = ^CallSideEffect : ~m2443_4
16042+
# 2445| m2445_6(unknown) = Chi : total:m2443_4, partial:m2445_5
16043+
# 2445| m2445_7(unknown) = ^InitializeDynamicAllocation : &:r2445_4
16044+
# 2445| r2445_8(ByValueConstructor *) = Convert : r2445_4
16045+
# 2445| r2445_9(glval<unknown>) = FunctionAddress[ByValueConstructor] :
16046+
# 2445| r2445_10(glval<ClassWithDestructor>) = VariableAddress[#temp2445:52] :
16047+
# 2445| r2445_11(glval<ClassWithDestructor>) = VariableAddress[a] :
16048+
# 2445| r2445_12(ClassWithDestructor) = Load[a] : &:r2445_11, m2443_6
16049+
# 2445| m2445_13(ClassWithDestructor) = Store[#temp2445:52] : &:r2445_10, r2445_12
16050+
# 2445| r2445_14(ClassWithDestructor) = Load[#temp2445:52] : &:r2445_10, m2445_13
16051+
# 2445| v2445_15(void) = Call[ByValueConstructor] : func:r2445_9, this:r2445_8, 0:r2445_14
16052+
# 2445| m2445_16(unknown) = ^CallSideEffect : ~m2445_6
16053+
# 2445| m2445_17(unknown) = Chi : total:m2445_6, partial:m2445_16
16054+
# 2445| m2445_18(ByValueConstructor) = ^IndirectMayWriteSideEffect[-1] : &:r2445_8
16055+
# 2445| m2445_19(unknown) = Chi : total:m2445_7, partial:m2445_18
16056+
# 2445| r2445_20(glval<ClassWithDestructor>) = CopyValue : r2445_10
16057+
# 2445| r2445_21(glval<unknown>) = FunctionAddress[~ClassWithDestructor] :
16058+
# 2445| v2445_22(void) = Call[~ClassWithDestructor] : func:r2445_21, this:r2445_20
16059+
# 2445| m2445_23(unknown) = ^CallSideEffect : ~m2445_17
16060+
# 2445| m2445_24(unknown) = Chi : total:m2445_17, partial:m2445_23
16061+
# 2445| v2445_25(void) = ^IndirectReadSideEffect[-1] : &:r2445_20, m2445_13
16062+
# 2445| m2445_26(ClassWithDestructor) = ^IndirectMayWriteSideEffect[-1] : &:r2445_20
16063+
# 2445| m2445_27(ClassWithDestructor) = Chi : total:m2445_13, partial:m2445_26
16064+
# 2445| m2445_28(ByValueConstructor *) = Store[b] : &:r2445_1, r2445_8
16065+
# 2446| v2446_1(void) = NoOp :
16066+
# 2443| v2443_7(void) = ReturnVoid :
16067+
# 2443| v2443_8(void) = AliasedUse : ~m2445_24
16068+
# 2443| v2443_9(void) = ExitFunction :
1609416069

1609516070
perf-regression.cpp:
1609616071
# 6| void Big::Big()

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

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,12 @@ missingOperand
22
unexpectedOperand
33
duplicateOperand
44
missingPhiOperand
5-
| ir.cpp:2445:52:2445:52 | Phi: reuse of temporary object | Instruction 'Phi: reuse of temporary object' is missing an operand for predecessor block 'EnterFunction: new_with_destructor' in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
65
missingOperandType
76
duplicateChiOperand
87
sideEffectWithoutPrimary
98
instructionWithoutSuccessor
109
ambiguousSuccessors
11-
| ir.cpp:2445:52:2445:52 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' has 3 successors of kind 'Goto' in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
1210
unexplainedLoop
13-
| ir.cpp:2445:29:2445:53 | Call: call to ByValueConstructor | Instruction 'Call: call to ByValueConstructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
14-
| ir.cpp:2445:29:2445:53 | Call: new | Instruction 'Call: new' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
15-
| ir.cpp:2445:29:2445:53 | CallSideEffect: call to ByValueConstructor | Instruction 'CallSideEffect: call to ByValueConstructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
16-
| ir.cpp:2445:29:2445:53 | CallSideEffect: new | Instruction 'CallSideEffect: new' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
17-
| ir.cpp:2445:29:2445:53 | Chi: call to ByValueConstructor | Instruction 'Chi: call to ByValueConstructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
18-
| ir.cpp:2445:29:2445:53 | Chi: call to ByValueConstructor | Instruction 'Chi: call to ByValueConstructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
19-
| ir.cpp:2445:29:2445:53 | Chi: new | Instruction 'Chi: new' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
20-
| ir.cpp:2445:29:2445:53 | Chi: new | Instruction 'Chi: new' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
21-
| ir.cpp:2445:29:2445:53 | Convert: new | Instruction 'Convert: new' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
22-
| ir.cpp:2445:29:2445:53 | FunctionAddress: call to ByValueConstructor | Instruction 'FunctionAddress: call to ByValueConstructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
23-
| ir.cpp:2445:29:2445:53 | IndirectMayWriteSideEffect: call to ByValueConstructor | Instruction 'IndirectMayWriteSideEffect: call to ByValueConstructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
24-
| ir.cpp:2445:29:2445:53 | InitializeDynamicAllocation: new | Instruction 'InitializeDynamicAllocation: new' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
25-
| ir.cpp:2445:52:2445:52 | Call: call to ~ClassWithDestructor | Instruction 'Call: call to ~ClassWithDestructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
26-
| ir.cpp:2445:52:2445:52 | CallSideEffect: call to ~ClassWithDestructor | Instruction 'CallSideEffect: call to ~ClassWithDestructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
27-
| ir.cpp:2445:52:2445:52 | Chi: call to ~ClassWithDestructor | Instruction 'Chi: call to ~ClassWithDestructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
28-
| ir.cpp:2445:52:2445:52 | Chi: reuse of temporary object | Instruction 'Chi: reuse of temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
29-
| ir.cpp:2445:52:2445:52 | CopyValue: reuse of temporary object | Instruction 'CopyValue: reuse of temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
30-
| ir.cpp:2445:52:2445:52 | FunctionAddress: call to ~ClassWithDestructor | Instruction 'FunctionAddress: call to ~ClassWithDestructor' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
31-
| ir.cpp:2445:52:2445:52 | IndirectMayWriteSideEffect: reuse of temporary object | Instruction 'IndirectMayWriteSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
32-
| ir.cpp:2445:52:2445:52 | IndirectReadSideEffect: reuse of temporary object | Instruction 'IndirectReadSideEffect: reuse of temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
33-
| ir.cpp:2445:52:2445:52 | Load: a | Instruction 'Load: a' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
34-
| ir.cpp:2445:52:2445:52 | Load: temporary object | Instruction 'Load: temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
35-
| ir.cpp:2445:52:2445:52 | Phi: reuse of temporary object | Instruction 'Phi: reuse of temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
36-
| ir.cpp:2445:52:2445:52 | Phi: reuse of temporary object | Instruction 'Phi: reuse of temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
37-
| ir.cpp:2445:52:2445:52 | Store: a | Instruction 'Store: a' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
38-
| ir.cpp:2445:52:2445:52 | VariableAddress: a | Instruction 'VariableAddress: a' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
39-
| ir.cpp:2445:52:2445:52 | VariableAddress: temporary object | Instruction 'VariableAddress: temporary object' is part of an unexplained loop in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
4011
unnecessaryPhiInstruction
4112
memoryOperandDefinitionIsUnmodeled
4213
operandAcrossFunctions
@@ -47,14 +18,8 @@ containsLoopOfForwardEdges
4718
missingIRType
4819
multipleIRTypes
4920
lostReachability
50-
| ir.cpp:2445:29:2445:53 | Call: new | Block 'Call: new' is not reachable by traversing only forward edges in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
51-
| ir.cpp:2445:29:2445:53 | Convert: new | Block 'Convert: new' is not reachable by traversing only forward edges in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
52-
| ir.cpp:2445:29:2445:53 | Store: new | Block 'Store: new' is not reachable by traversing only forward edges in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
5321
backEdgeCountMismatch
5422
useNotDominatedByDefinition
55-
| ir.cpp:2445:29:2445:53 | StoreValue | Operand 'StoreValue' is not dominated by its definition in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
56-
| ir.cpp:2445:29:2445:53 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
57-
| ir.cpp:2445:52:2445:52 | Unary | Operand 'Unary' is not dominated by its definition in function '$@'. | ir.cpp:2443:6:2443:24 | void new_with_destructor(ClassWithDestructor) | void new_with_destructor(ClassWithDestructor) |
5823
switchInstructionWithoutDefaultEdge
5924
notMarkedAsConflated
6025
wronglyMarkedAsConflated

0 commit comments

Comments
 (0)