File tree Expand file tree Collapse file tree 12 files changed +162
-0
lines changed Expand file tree Collapse file tree 12 files changed +162
-0
lines changed Original file line number Diff line number Diff line change
1
+ int a ;
2
+
3
+ void main (void )
4
+ {
5
+ int i = 0 ;
6
+
7
+ if (i < 10 )
8
+ {
9
+ a = 1 ;
10
+ }
11
+ else
12
+ {
13
+ a = 2 ;
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --dependence-graph --show
4
+ activate-multi-line-match
5
+ EXIT=0
6
+ SIGNAL=0
7
+ // First assignment has a control dependency on the if
8
+ \/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
9
+ // Second assignment has a control dependency on the if
10
+ \/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 2
11
+ --
12
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ int a ;
2
+
3
+ void func ()
4
+ {
5
+ }
6
+
7
+ void main (void )
8
+ {
9
+ func ();
10
+
11
+ if (a < 10 )
12
+ {
13
+ a = 1 ;
14
+ }
15
+ }
Original file line number Diff line number Diff line change
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 if
8
+ \/\/ ([0-9]+).*\n.*IF.*a < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
9
+ --
10
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ int a ;
2
+
3
+ void func ()
4
+ {
5
+ }
6
+
7
+ void main (void )
8
+ {
9
+ if (a < 7 )
10
+ {
11
+ goto L ;
12
+ }
13
+
14
+ if (a < 10 )
15
+ {
16
+ func ();
17
+ L :
18
+ a = 1 ;
19
+ a = 2 ;
20
+ }
21
+ }
Original file line number Diff line number Diff line change
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 if
8
+ \/\/ ([0-9]+).*\n.*IF.*a < 10.*THEN(.*\n)*Control dependencies: .*\1.*\n(.*\n){2,3}.*a = 2
9
+ --
10
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ int a ;
2
+
3
+ void main (void )
4
+ {
5
+ int i = 0 ;
6
+ while (i < 10 )
7
+ {
8
+ a = 1 ;
9
+ }
10
+ }
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
1
+ int a ;
2
+
3
+ void main (void )
4
+ {
5
+ int i = 0 ;
6
+ while (i < 10 )
7
+ {
8
+ if (i < 7 )
9
+ {
10
+ a = 1 ;
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
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 if
8
+ \/\/ ([0-9]+).*\n.*IF.*i < 7.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
9
+ // If has a control dependency on the loop head
10
+ \/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*i < 7
11
+ --
12
+ ^warning: ignoring
13
+ // Assignment does not have a control dependency on the loop head
14
+ \/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 1
Original file line number Diff line number Diff line change
1
+ int a ;
2
+
3
+ void main (void )
4
+ {
5
+ int i = 0 ;
6
+
7
+ if (i < 10 )
8
+ {
9
+ if (i < 7 )
10
+ {
11
+ a = 1 ;
12
+ }
13
+
14
+ a = 2 ;
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --dependence-graph --show
4
+ activate-multi-line-match
5
+ EXIT=0
6
+ SIGNAL=0
7
+ // Second assignment has a control dependency on the outer if
8
+ \/\/ ([0-9]+).*\n.*IF.*i < 10.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 2
9
+ --
10
+ ^warning: ignoring
11
+ // Second assignment does not have a control dependency on the inner if
12
+ \/\/ ([0-9]+).*\n.*IF.*i < 7.*THEN(.*\n)*Control dependencies: \1\n(.*\n){2,3}.*a = 2
You can’t perform that action at this time.
0 commit comments