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]

Data dependence merge


Sebastian --

I've reviewed your data dependence patch.

+ if (integer_zerop
+ (fold (build2 (GT_EXPR, TREE_TYPE (estimation), + loop->estimated_nb_iterations, estimation))))


This should just be TREE_INT_CST_LT.

+/* Returns true iff A divides B. */
+
+static inline bool +int_divides_p (int a, int b)
+{
+ return (a == gcd (a, b));
}


Should be "return a % b == 0". There's a good chance the compiler can optimize that better.

+#define FLOOR(x,y) (CEIL (x, y) - 1)

That is incorrect in the case that Y divides X; for example CEIL (6, 3) == 2 and FLOOR (6, 3) == 2.

+static bool
+undetermined_conflicts_p (tree overlaps)
+{
+  if (chrec_contains_undetermined (overlaps))
+    return true;
+  else
+    return false;
+}
+
+/* Returns true when OVERLAPS contains the information that there is
+   no conflicting elements.  */
+
+static bool
+no_conflicts_p (tree overlaps)
+{
+  if (overlaps == chrec_known)
+    return true;
+  else
+    return false;
+}


Should just be "return chrec_contains_undetermined (overlaps)" and "return overlaps == chrec_known". (Or if c_c_u does not return bool, then "return c_c_u (o) != 0", if you like.


If you and your cohorts can correct the above issues, and perform the three-platform test, go ahead and check this in. Once you have a final version of the patch, I'll be happy to help with testing on some platforms that you don't have, if that would be of help.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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