1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
CORE
main.c
--dependence-graph --show
activate-multi-line-match
EXIT=0
SIGNAL=0
// Assignment has a control dependency on the if
\/\/ ([0-9]+).*\n.*IF.*i < 7.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
// If has a control dependency on the loop head
\/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*i < 7
--
^warning: ignoring
// Assignment does not have a control dependency on the loop head
\/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
--
The first regex above matches output portions like shown below (with <N> being a
location number). The intention is to check whether the assignment has a control
dependency on the if.
// <N> file main.c line 6 function main
1: IF !(i < 7) THEN GOTO 2
...
**** 3 file main.c line 8 function main
Control dependencies: <N>
// 3 file main.c line 8 function main
a = 1;
The second regex above matches output portions like shown below (with <N> being
a location number). The intention is to check whether the if has a control
dependency on the loop head.
// <N> file main.c line 6 function main
1: IF !(i < 10) THEN GOTO 3
**** 3 file main.c line 8 function main
Control dependencies: <N>
Data dependencies: 1
// 3 file main.c line 8 function main
IF !(i < 7) THEN GOTO 2
The third regex above matches output portions like shown below (with <N> being a
location number). The intention is to check that the assignment does not have a
control dependency on the loop head.
// <N> file main.c line 6 function main
1: IF !(i < 10) THEN GOTO 3
...
**** 4 file main.c line 10 function main
Control dependencies: <N>
// 4 file main.c line 10 function main
a = 1;
|