Dear gcc contributors, could you please advise how to better write the following testcase? After the compilation with -O2 -fdump-tree-graphite-all -fgraphite-identity -fgraphite-code-generator=isl the dump file should contain the following text
ISL AST generated by ISL: for (int c1 = 0; c1 < n - 1; c1 += 1) for (int c3 = 0; c3 < n; c3 += 1) S_5(c1, c3);" 1 "graphite"} } I am using the following code to check it: diff --git a/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c b/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c new file mode 100644 index 0000000..1bb0349 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/isl-codegen-loop-dumping.c @@ -0,0 +1,16 @@ +/* { dg-options "-O2 -fdump-tree-graphite-all -fgraphite-identity -fgraphite-code-generator=isl" } */ + +int +main (int n, int *a) +{ + int i, j; + + for (i = 0; i < n - 1; i++) + for (j = 0; j < n; j++) + a[j] = i + n; + + return 0; +} + +/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL: \nfor \\(int c1 = 0; c1 < n - 1; c1 \\+= 1\\)\n for \\(int c3 = 0; c3 < n; c3 \\+= 1\\)\n S_5\\(c1, c3\\);" 1 "graphite"} } */ +/* { dg-final { cleanup-tree-dump "graphite" } } */ However, I want to make the regular expression easier to read and similar to the following multiline form: +/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL: \n ? for \\(int c1 = 0; c1 < n - 1; c1 \\+= 1\\)\n ? for \\(int c3 = 0; c3 < n; c3 \\+= 1\\)\n ? S_5\\(c1, c3\\);" 1 "graphite"} ? } */ Is it possible? Where can I find the description of regular expressions used in scan-tree-dump-times? I would be very grateful for your comments. -- Cheers, Roman Gareev