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]

[GSoC][match-and-simplify] use dt_simplify::capture_max


* genmatch.c (dt_simplify::gen_gimple): Use dt_simplify::capture_max.
      (dt_simplify::gen_generic): Likewise.

Thanks,
Prathamesh
Index: genmatch.c
===================================================================
--- genmatch.c	(revision 213343)
+++ genmatch.c	(working copy)
@@ -1473,7 +1473,7 @@ dt_simplify::gen_gimple (FILE *f)
   fprintf (f, "/* simplify %u */\n", pattern_no);
 
   fprintf (f, "{\n");
-  fprintf (f, "tree captures[4] ATTRIBUTE_UNUSED = {};\n");
+  fprintf (f, "tree captures[%u] ATTRIBUTE_UNUSED = {};\n", dt_simplify::capture_max);
 
   for (unsigned i = 0; i < dt_simplify::capture_max; ++i)
     if (indexes[i])
@@ -1538,7 +1538,7 @@ dt_simplify::gen_generic (FILE *f)
   fprintf (f, "/* simplify %u */\n", pattern_no);
 
   fprintf (f, "{\n");
-  fprintf (f, "tree captures[4] ATTRIBUTE_UNUSED = {};\n");
+  fprintf (f, "tree captures[%u] ATTRIBUTE_UNUSED = {};\n", dt_simplify::capture_max);
 
   for (unsigned i = 0; i < dt_simplify::capture_max; ++i)
     if (indexes[i])

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