On 26/07/15 18:53, Tom de Vries wrote:
On 26/07/15 18:49, Tom de Vries wrote:
On 24/07/15 16:39, Tom de Vries wrote:
Hi,

this patch allows parallelization and vectorization of reduction
operators that are guaranteed to not overflow (such as min and max
operators), independent of the overflow behaviour of the type.

Bootstrapped and reg-tested on x86_64.

OK for trunk?

Thanks,
- Tom

[ Slip-of-the-keyboard ]

This is the graphite version of this patch.

Bootstrapped and reg-tested on x86_64.

OK for trunk?


Committed to gomp-4_0-branch.

Thanks,
- Tom

0002-Handle-non-overflow-reductions-in-graphite.patch


Handle non-overflow reductions in graphite

2015-07-21  Tom de Vries<t...@codesourcery.com>

        * graphite-sese-to-poly.c (is_reduction_operation_p): Allow operations
        that do not overflow.
---
  gcc/graphite-sese-to-poly.c | 15 +++++++++++++--
  1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index c583f16..531c848 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2614,8 +2614,19 @@ is_reduction_operation_p (gimple stmt)
    if (FLOAT_TYPE_P (type))
      return flag_associative_math;

-  return (INTEGRAL_TYPE_P (type)
-         && TYPE_OVERFLOW_WRAPS (type));
+  if (ANY_INTEGRAL_TYPE_P (type))
+    {
+      if (INTEGRAL_TYPE_P (type)
+         && TYPE_OVERFLOW_WRAPS (type))
+       return true;
+
+      if (no_overflow_tree_code (code, type))
+       return true;
+
+      return false;
+    }
+
+  return false;
  }

  /* Returns true when PHI contains an argument ARG.  */
-- 1.9.1


Reply via email to