From: Tom de Vries <Tom_deVries@mentor.com>
To: "gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: Re: [PATCH] Allow non-overflow ops in vect_is_simple_reduction_1
Date: Sun, 26 Jul 2015 17:09:00 -0000 [thread overview]
Message-ID: <55B5108B.4040400@mentor.com> (raw)
In-Reply-To: <55B50F85.3070408@mentor.com>
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
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?
Thanks,
- Tom
[-- Attachment #2: 0002-Handle-non-overflow-reductions-in-graphite.patch --]
[-- Type: text/x-patch, Size: 971 bytes --]
Handle non-overflow reductions in graphite
2015-07-21 Tom de Vries <tom@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
next prev parent reply other threads:[~2015-07-26 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-24 14:46 Tom de Vries
2015-07-26 17:00 ` Tom de Vries
2015-07-26 17:09 ` Tom de Vries [this message]
2015-07-28 7:44 ` [committed, gomp4] Handle non-overflow reductions in graphite Tom de Vries
2015-07-28 7:41 ` [committed, gomp4] Allow non-overflow ops in vect_is_simple_reduction_1 Tom de Vries
2015-07-28 8:09 ` [PATCH] " Richard Biener
2015-07-28 12:30 ` Tom de Vries
2015-07-29 8:28 ` Richard Biener
2015-07-29 11:59 ` Tom de Vries
2015-07-29 12:13 ` Richard Biener
2015-07-29 17:29 ` Tom de Vries
2015-07-31 10:26 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B5108B.4040400@mentor.com \
--to=tom_devries@mentor.com \
--cc=gcc-patches@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).