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