Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6804018

Browse files
committed
C++: Accept output
1 parent 522c629 commit 6804018

7 files changed

Lines changed: 11 additions & 49 deletions

File tree

cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ ssa.cpp:
2929
# 15| r15_6(int) = Add : r15_4, r15_5
3030
# 15| m15_7(int) = Store : &:r15_3, r15_6
3131
# 15| m15_8(unknown) = Chi : total:m13_9, partial:m15_7
32-
# 15| r15_9(int) = CopyValue : r15_4
3332
#-----| Goto -> Block 3
3433

3534
# 18| Block 2
@@ -41,7 +40,6 @@ ssa.cpp:
4140
# 18| r18_6(int) = Add : r18_4, r18_5
4241
# 18| m18_7(int) = Store : &:r18_3, r18_6
4342
# 18| m18_8(unknown) = Chi : total:m13_9, partial:m18_7
44-
# 18| r18_9(int) = CopyValue : r18_4
4543
#-----| Goto -> Block 3
4644

4745
# 21| Block 3
@@ -63,7 +61,6 @@ ssa.cpp:
6361
# 22| r22_6(int) = Add : r22_4, r22_5
6462
# 22| m22_7(int) = Store : &:r22_3, r22_6
6563
# 22| m22_8(unknown) = Chi : total:m21_3, partial:m22_7
66-
# 22| r22_9(int) = CopyValue : r22_4
6764
#-----| Goto -> Block 6
6865

6966
# 25| Block 5
@@ -75,7 +72,6 @@ ssa.cpp:
7572
# 25| r25_6(int) = Add : r25_4, r25_5
7673
# 25| m25_7(int) = Store : &:r25_3, r25_6
7774
# 25| m25_8(unknown) = Chi : total:m21_3, partial:m25_7
78-
# 25| r25_9(int) = CopyValue : r25_4
7975
#-----| Goto -> Block 6
8076

8177
# 28| Block 6
@@ -197,7 +193,6 @@ ssa.cpp:
197193
# 62| r62_3(int) = Constant[1] :
198194
# 62| r62_4(int) = Add : r62_2, r62_3
199195
# 62| m62_5(int) = Store : &:r62_1, r62_4
200-
# 62| r62_6(int) = CopyValue : r62_2
201196
# 63| r63_1(bool) = Constant[0] :
202197
# 63| v63_2(void) = ConditionalBranch : r63_1
203198
#-----| False -> Block 1

cpp/ql/test/library-tests/ir/ssa/aliased_ssa_ir_unsound.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ ssa.cpp:
2929
# 15| r15_6(int) = Add : r15_4, r15_5
3030
# 15| m15_7(int) = Store : &:r15_3, r15_6
3131
# 15| m15_8(unknown) = Chi : total:m13_9, partial:m15_7
32-
# 15| r15_9(int) = CopyValue : r15_4
3332
#-----| Goto -> Block 3
3433

3534
# 18| Block 2
@@ -41,7 +40,6 @@ ssa.cpp:
4140
# 18| r18_6(int) = Add : r18_4, r18_5
4241
# 18| m18_7(int) = Store : &:r18_3, r18_6
4342
# 18| m18_8(unknown) = Chi : total:m13_9, partial:m18_7
44-
# 18| r18_9(int) = CopyValue : r18_4
4543
#-----| Goto -> Block 3
4644

4745
# 21| Block 3
@@ -63,7 +61,6 @@ ssa.cpp:
6361
# 22| r22_6(int) = Add : r22_4, r22_5
6462
# 22| m22_7(int) = Store : &:r22_3, r22_6
6563
# 22| m22_8(unknown) = Chi : total:m21_3, partial:m22_7
66-
# 22| r22_9(int) = CopyValue : r22_4
6764
#-----| Goto -> Block 6
6865

6966
# 25| Block 5
@@ -75,7 +72,6 @@ ssa.cpp:
7572
# 25| r25_6(int) = Add : r25_4, r25_5
7673
# 25| m25_7(int) = Store : &:r25_3, r25_6
7774
# 25| m25_8(unknown) = Chi : total:m21_3, partial:m25_7
78-
# 25| r25_9(int) = CopyValue : r25_4
7975
#-----| Goto -> Block 6
8076

8177
# 28| Block 6
@@ -197,7 +193,6 @@ ssa.cpp:
197193
# 62| r62_3(int) = Constant[1] :
198194
# 62| r62_4(int) = Add : r62_2, r62_3
199195
# 62| m62_5(int) = Store : &:r62_1, r62_4
200-
# 62| r62_6(int) = CopyValue : r62_2
201196
# 63| r63_1(bool) = Constant[0] :
202197
# 63| v63_2(void) = ConditionalBranch : r63_1
203198
#-----| False -> Block 1

cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ ssa.cpp:
2727
# 15| r15_5(int) = Constant[1] :
2828
# 15| r15_6(int) = Add : r15_4, r15_5
2929
# 15| mu15_7(int) = Store : &:r15_3, r15_6
30-
# 15| r15_8(int) = CopyValue : r15_4
3130
#-----| Goto -> Block 3
3231

3332
# 18| Block 2
@@ -38,7 +37,6 @@ ssa.cpp:
3837
# 18| r18_5(int) = Constant[1] :
3938
# 18| r18_6(int) = Add : r18_4, r18_5
4039
# 18| mu18_7(int) = Store : &:r18_3, r18_6
41-
# 18| r18_8(int) = CopyValue : r18_4
4240
#-----| Goto -> Block 3
4341

4442
# 21| Block 3
@@ -56,7 +54,6 @@ ssa.cpp:
5654
# 22| r22_5(int) = Constant[1] :
5755
# 22| r22_6(int) = Add : r22_4, r22_5
5856
# 22| mu22_7(int) = Store : &:r22_3, r22_6
59-
# 22| r22_8(int) = CopyValue : r22_4
6057
#-----| Goto -> Block 6
6158

6259
# 25| Block 5
@@ -67,7 +64,6 @@ ssa.cpp:
6764
# 25| r25_5(int) = Constant[1] :
6865
# 25| r25_6(int) = Add : r25_4, r25_5
6966
# 25| mu25_7(int) = Store : &:r25_3, r25_6
70-
# 25| r25_8(int) = CopyValue : r25_4
7167
#-----| Goto -> Block 6
7268

7369
# 28| Block 6
@@ -192,7 +188,6 @@ ssa.cpp:
192188
# 62| r62_3(int) = Constant[1] :
193189
# 62| r62_4(int) = Add : r62_2, r62_3
194190
# 62| m62_5(int) = Store : &:r62_1, r62_4
195-
# 62| r62_6(int) = CopyValue : r62_2
196191
# 63| r63_1(bool) = Constant[0] :
197192
# 63| v63_2(void) = ConditionalBranch : r63_1
198193
#-----| False -> Block 1

cpp/ql/test/library-tests/ir/ssa/unaliased_ssa_ir_unsound.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ ssa.cpp:
2727
# 15| r15_5(int) = Constant[1] :
2828
# 15| r15_6(int) = Add : r15_4, r15_5
2929
# 15| mu15_7(int) = Store : &:r15_3, r15_6
30-
# 15| r15_8(int) = CopyValue : r15_4
3130
#-----| Goto -> Block 3
3231

3332
# 18| Block 2
@@ -38,7 +37,6 @@ ssa.cpp:
3837
# 18| r18_5(int) = Constant[1] :
3938
# 18| r18_6(int) = Add : r18_4, r18_5
4039
# 18| mu18_7(int) = Store : &:r18_3, r18_6
41-
# 18| r18_8(int) = CopyValue : r18_4
4240
#-----| Goto -> Block 3
4341

4442
# 21| Block 3
@@ -56,7 +54,6 @@ ssa.cpp:
5654
# 22| r22_5(int) = Constant[1] :
5755
# 22| r22_6(int) = Add : r22_4, r22_5
5856
# 22| mu22_7(int) = Store : &:r22_3, r22_6
59-
# 22| r22_8(int) = CopyValue : r22_4
6057
#-----| Goto -> Block 6
6158

6259
# 25| Block 5
@@ -67,7 +64,6 @@ ssa.cpp:
6764
# 25| r25_5(int) = Constant[1] :
6865
# 25| r25_6(int) = Add : r25_4, r25_5
6966
# 25| mu25_7(int) = Store : &:r25_3, r25_6
70-
# 25| r25_8(int) = CopyValue : r25_4
7167
#-----| Goto -> Block 6
7268

7369
# 28| Block 6
@@ -192,7 +188,6 @@ ssa.cpp:
192188
# 62| r62_3(int) = Constant[1] :
193189
# 62| r62_4(int) = Add : r62_2, r62_3
194190
# 62| m62_5(int) = Store : &:r62_1, r62_4
195-
# 62| r62_6(int) = CopyValue : r62_2
196191
# 63| r63_1(bool) = Constant[0] :
197192
# 63| v63_2(void) = ConditionalBranch : r63_1
198193
#-----| False -> Block 1

cpp/ql/test/library-tests/rangeanalysis/signanalysis/SignAnalysis.expected

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
| test.c:24:5:24:9 | Load: count | positive |
5656
| test.c:24:5:24:11 | Add: ... ++ | positive strictlyPositive |
5757
| test.c:24:5:24:11 | Constant: ... ++ | positive strictlyPositive |
58-
| test.c:24:5:24:11 | CopyValue: ... ++ | positive |
5958
| test.c:24:5:24:11 | Store: ... ++ | positive strictlyPositive |
6059
| test.c:25:5:25:22 | Store: ... = ... | positive |
6160
| test.c:25:13:25:17 | Load: count | positive strictlyPositive |
@@ -86,7 +85,6 @@
8685
| test.c:42:22:42:22 | Load: i | positive |
8786
| test.c:42:22:42:24 | Add: ... ++ | positive strictlyPositive |
8887
| test.c:42:22:42:24 | Constant: ... ++ | positive strictlyPositive |
89-
| test.c:42:22:42:24 | CopyValue: ... ++ | positive |
9088
| test.c:42:22:42:24 | Store: ... ++ | positive strictlyPositive |
9189
| test.c:43:5:43:9 | Load: total | positive |
9290
| test.c:43:5:43:14 | Add: ... += ... | positive |
@@ -459,7 +457,6 @@
459457
| test.c:343:5:343:5 | Load: i | positive |
460458
| test.c:343:5:343:7 | Add: ... ++ | positive strictlyPositive |
461459
| test.c:343:5:343:7 | Constant: ... ++ | positive strictlyPositive |
462-
| test.c:343:5:343:7 | CopyValue: ... ++ | positive |
463460
| test.c:343:5:343:7 | Store: ... ++ | positive strictlyPositive |
464461
| test.c:345:3:345:7 | Store: ... = ... | positive strictlyPositive |
465462
| test.c:345:7:345:7 | Load: i | positive strictlyPositive |
@@ -657,7 +654,6 @@
657654
| test.c:398:9:398:9 | Load: y | positive strictlyPositive |
658655
| test.c:398:9:398:11 | Add: ... ++ | positive strictlyPositive |
659656
| test.c:398:9:398:11 | Constant: ... ++ | positive strictlyPositive |
660-
| test.c:398:9:398:11 | CopyValue: ... ++ | positive strictlyPositive |
661657
| test.c:398:9:398:11 | Store: ... ++ | positive strictlyPositive |
662658
| test.c:398:9:398:22 | CopyValue: ... , ... | positive strictlyPositive |
663659
| test.c:398:14:398:14 | Load: y | positive strictlyPositive |

cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
| test.cpp:56:13:56:16 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only |
5555
| test.cpp:56:13:56:16 | * ... | test.cpp:56:31:56:34 | * ... | AST only |
5656
| test.cpp:56:13:56:16 | * ... | test.cpp:59:9:59:12 | * ... | AST only |
57-
| test.cpp:56:14:56:16 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only |
5857
| test.cpp:56:21:56:24 | (int)... | test.cpp:53:10:53:13 | (int)... | AST only |
5958
| test.cpp:56:21:56:24 | (int)... | test.cpp:56:21:56:24 | (int)... | AST only |
6059
| test.cpp:56:30:56:43 | (...) | test.cpp:56:30:56:43 | (...) | AST only |
@@ -63,34 +62,25 @@
6362
| test.cpp:56:31:56:34 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only |
6463
| test.cpp:56:31:56:34 | * ... | test.cpp:56:13:56:16 | * ... | AST only |
6564
| test.cpp:56:31:56:34 | * ... | test.cpp:59:9:59:12 | * ... | AST only |
66-
| test.cpp:56:32:56:34 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only |
6765
| test.cpp:56:39:56:42 | (int)... | test.cpp:44:9:44:9 | 0 | AST only |
6866
| test.cpp:56:39:56:42 | (int)... | test.cpp:51:25:51:25 | 0 | AST only |
6967
| test.cpp:56:39:56:42 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only |
7068
| test.cpp:56:39:56:42 | (int)... | test.cpp:56:39:56:42 | (int)... | AST only |
7169
| test.cpp:56:39:56:42 | (int)... | test.cpp:59:17:59:20 | (int)... | AST only |
7270
| test.cpp:56:39:56:42 | (int)... | test.cpp:88:12:88:12 | 0 | AST only |
73-
| test.cpp:56:47:56:49 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only |
74-
| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:14:56:16 | ptr | IR only |
75-
| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:32:56:34 | ptr | IR only |
76-
| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:47:56:49 | ptr | IR only |
77-
| test.cpp:56:47:56:51 | ... ++ | test.cpp:59:10:59:12 | ptr | IR only |
71+
| test.cpp:56:47:56:51 | ... ++ | test.cpp:56:47:56:51 | ... ++ | AST only |
7872
| test.cpp:59:9:59:12 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only |
7973
| test.cpp:59:9:59:12 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only |
8074
| test.cpp:59:9:59:12 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only |
8175
| test.cpp:59:9:59:12 | * ... | test.cpp:56:13:56:16 | * ... | AST only |
8276
| test.cpp:59:9:59:12 | * ... | test.cpp:56:31:56:34 | * ... | AST only |
83-
| test.cpp:59:10:59:12 | ptr | test.cpp:56:47:56:51 | ... ++ | IR only |
8477
| test.cpp:59:17:59:20 | (int)... | test.cpp:44:9:44:9 | 0 | AST only |
8578
| test.cpp:59:17:59:20 | (int)... | test.cpp:51:25:51:25 | 0 | AST only |
8679
| test.cpp:59:17:59:20 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only |
8780
| test.cpp:59:17:59:20 | (int)... | test.cpp:56:39:56:42 | (int)... | AST only |
8881
| test.cpp:59:17:59:20 | (int)... | test.cpp:59:17:59:20 | (int)... | AST only |
8982
| test.cpp:59:17:59:20 | (int)... | test.cpp:88:12:88:12 | 0 | AST only |
90-
| test.cpp:62:5:62:10 | result | test.cpp:62:5:62:12 | ... ++ | IR only |
91-
| test.cpp:62:5:62:12 | ... ++ | test.cpp:62:5:62:10 | result | IR only |
92-
| test.cpp:62:5:62:12 | ... ++ | test.cpp:65:10:65:15 | result | IR only |
93-
| test.cpp:65:10:65:15 | result | test.cpp:62:5:62:12 | ... ++ | IR only |
83+
| test.cpp:62:5:62:12 | ... ++ | test.cpp:62:5:62:12 | ... ++ | AST only |
9484
| test.cpp:77:20:77:28 | call to getAValue | test.cpp:79:7:79:7 | v | IR only |
9585
| test.cpp:77:20:77:30 | (signed short)... | test.cpp:77:20:77:30 | (signed short)... | AST only |
9686
| test.cpp:77:20:77:30 | (signed short)... | test.cpp:79:7:79:7 | v | AST only |

cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ test.cpp:
404404

405405
# 53| Block 1
406406
# 53| m53_1(unsigned int) = Phi : from 0:m51_3, from 8:m62_5
407-
# 53| valnum = m53_1, m65_4, r62_2, r62_6, r65_3
407+
# 53| valnum = m53_1, m65_4, r62_2, r65_3
408408
# 53| r53_2(glval<char *>) = VariableAddress[str] :
409409
# 53| valnum = r49_6, r53_2, r56_6
410410
# 53| r53_3(char *) = Load : &:r53_2, m49_7
@@ -434,11 +434,11 @@ test.cpp:
434434

435435
# 56| Block 3
436436
# 56| m56_1(decltype(nullptr)) = Phi : from 2:m55_4, from 5:m56_23
437-
# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2
437+
# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
438438
# 56| r56_2(glval<char *>) = VariableAddress[ptr] :
439439
# 56| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1
440440
# 56| r56_3(char *) = Load : &:r56_2, m56_1
441-
# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2
441+
# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
442442
# 56| r56_4(char) = Load : &:r56_3, ~m49_4
443443
# 56| valnum = unique
444444
# 56| r56_5(int) = Convert : r56_4
@@ -461,7 +461,7 @@ test.cpp:
461461
# 56| r56_12(glval<char *>) = VariableAddress[ptr] :
462462
# 56| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1
463463
# 56| r56_13(char *) = Load : &:r56_12, m56_1
464-
# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2
464+
# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
465465
# 56| r56_14(char) = Load : &:r56_13, ~m49_4
466466
# 56| valnum = unique
467467
# 56| r56_15(int) = Convert : r56_14
@@ -478,22 +478,20 @@ test.cpp:
478478
# 56| r56_19(glval<char *>) = VariableAddress[ptr] :
479479
# 56| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1
480480
# 56| r56_20(char *) = Load : &:r56_19, m56_1
481-
# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2
481+
# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
482482
# 56| r56_21(int) = Constant[1] :
483483
# 56| valnum = unique
484484
# 56| r56_22(char *) = PointerAdd[1] : r56_20, r56_21
485485
# 56| valnum = m56_23, r56_22
486486
# 56| m56_23(char *) = Store : &:r56_19, r56_22
487487
# 56| valnum = m56_23, r56_22
488-
# 56| r56_24(char *) = CopyValue : r56_20
489-
# 56| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2
490488
#-----| Goto (back edge) -> Block 3
491489

492490
# 59| Block 6
493491
# 59| r59_1(glval<char *>) = VariableAddress[ptr] :
494492
# 59| valnum = r50_1, r55_3, r56_12, r56_19, r56_2, r59_1
495493
# 59| r59_2(char *) = Load : &:r59_1, m56_1
496-
# 59| valnum = m56_1, r56_13, r56_20, r56_24, r56_3, r59_2
494+
# 59| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
497495
# 59| r59_3(char) = Load : &:r59_2, ~m49_4
498496
# 59| valnum = unique
499497
# 59| r59_4(int) = Convert : r59_3
@@ -514,15 +512,13 @@ test.cpp:
514512
# 62| r62_1(glval<unsigned int>) = VariableAddress[result] :
515513
# 62| valnum = r51_1, r62_1, r65_2
516514
# 62| r62_2(unsigned int) = Load : &:r62_1, m53_1
517-
# 62| valnum = m53_1, m65_4, r62_2, r62_6, r65_3
515+
# 62| valnum = m53_1, m65_4, r62_2, r65_3
518516
# 62| r62_3(unsigned int) = Constant[1] :
519517
# 62| valnum = unique
520518
# 62| r62_4(unsigned int) = Add : r62_2, r62_3
521519
# 62| valnum = m62_5, r62_4
522520
# 62| m62_5(unsigned int) = Store : &:r62_1, r62_4
523521
# 62| valnum = m62_5, r62_4
524-
# 62| r62_6(unsigned int) = CopyValue : r62_2
525-
# 62| valnum = m53_1, m65_4, r62_2, r62_6, r65_3
526522
#-----| Goto (back edge) -> Block 1
527523

528524
# 63| Block 9
@@ -532,9 +528,9 @@ test.cpp:
532528
# 65| r65_2(glval<unsigned int>) = VariableAddress[result] :
533529
# 65| valnum = r51_1, r62_1, r65_2
534530
# 65| r65_3(unsigned int) = Load : &:r65_2, m53_1
535-
# 65| valnum = m53_1, m65_4, r62_2, r62_6, r65_3
531+
# 65| valnum = m53_1, m65_4, r62_2, r65_3
536532
# 65| m65_4(unsigned int) = Store : &:r65_1, r65_3
537-
# 65| valnum = m53_1, m65_4, r62_2, r62_6, r65_3
533+
# 65| valnum = m53_1, m65_4, r62_2, r65_3
538534
# 49| v49_14(void) = ReturnIndirection : &:r49_8, m49_9
539535
# 49| v49_15(void) = ReturnIndirection : &:r49_12, m49_13
540536
# 49| r49_16(glval<unsigned int>) = VariableAddress[#return] :

0 commit comments

Comments
 (0)