This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GSoC] Handling of isl_ast_op_pdiv_q and isl_ast_op_pdiv_r


On 23/07/2014 16:55, Roman Gareev wrote:
I've attached the patch, which adds handling of isl_ast_op_pdiv_q and
isl_ast_op_pdiv_r. It also contains a corresponding test case, which
generates the following ISL AST:

{
   for (int c1 = 0; c1 < -((-k.0 + i + 4294967296) % 4294967296) +
4294967296; c1 += 1)
     S_4(c1);
   S_6();
}

Is it fine for trunk?

Some minor comments in the test case, otherwise LGTM. Feel free to commit after addressing those.

Index: gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c
===================================================================
--- gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c	(revision 0)
+++ gcc/testsuite/gcc.dg/graphite/isl-ast-gen-blocks-3.c	(working copy)
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity -fgraphite-code-generator=isl" } */
+
+int k = 50;

Any reason you don't make 'k' a function parameter?

+static int __attribute__((noinline))
+foo ()
+{
+  int i, res;
+  for (i = k/2, res = 0; i < k; i++)

Can you initialize res outside of the loop?

Cheers,
Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]