CORE
main.c
--dependence-graph --show
activate-multi-line-match
EXIT=0
SIGNAL=0
// Assignment has a control dependency on the loop head
\/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
// Backedge has a control dependency on the loop head
\/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}\s*GOTO [0-9]+
// Loop head has a control dependency on itself
Control dependencies: ([0-9]+)\n(.*\n)?\n.*\/\/ \1.*\n.*IF.*i < 10.*THEN
--
^warning: ignoring
--
The first regex above match 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 loop head.

        // <N> file main.c line 6 function main
     1: IF !(i < 10) 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 match output portions like shown below (with <N> being a
location number). The intention is to check whether the backwards goto has a
control dependency on the loop head.

        // <N> file main.c line 6 function main
     1: IF !(i < 10) THEN GOTO 2
...
**** 4 file main.c line 6 function main
Control dependencies: <N>

        // 4 file main.c line 6 function main
        GOTO 1

The third regex above match output portions like shown below (with <N> being a
location number). The intention is to check whether the loop head has a control
dependency on itself.

Control dependencies: <N>
Data dependencies: 1

        // <N> file main.c line 6 function main
     1: IF !(i < 10) THEN GOTO 2
