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: [patch] Move mode-switching to its own file


Hello Steven!

+      /* Calculate the optimal locations for the
+	 placement mode switches to modes with priority I.  */
+
+      FOR_EACH_BB (bb)
+	sbitmap_not (kill[bb->index], transp[bb->index]);
+      edge_list = pre_edge_lcm (file, 1, transp, comp, antic,
+				kill, &insert, &delete);
+
+      for (j = n_entities - 1; j >= 0; j--)


  There is a bug in above code. Because n_exprs parameter in the call to
pre_edge_lcm() is set to 1, insertion points will be calculated only for the
first entity and only one-column matrix will be returned.

  This code follows the call to pre_edge_lcm ():

+	      if (! TEST_BIT (insert[e], j))
+		continue;

This is a check of j-th column (for j-th entity) of insertion matrix and becuase
returned insertion matrix from pre_edge_lcm () has always only one column,
returns undefined result when number of entities is > 1 .

  The correct n_expr parameter should be set to n_entities instead:

+      edge_list = pre_edge_lcm (file, n_entities, transp, comp, antic,
+				kill, &insert, &delete);

  This bugfix in included in (currenly unreviewed) patch to improve mode
switching: http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00131.html

(I have added Roger to CC as this is IMO a midlevel bug).

Uros.


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