public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
@ 2017-04-18 10:53 Bin Cheng
  2017-04-26 13:51 ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Cheng @ 2017-04-18 10:53 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Hi,
Given only integer variables are meaningful for register pressure estimation in IVOPTs,
this patch skips non-integer type PHIs when counting register pressure.
Is it OK?
Thanks,
bin

2017-04-11  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
	when counting register pressure.


[-- Attachment #2: 0028-skip-non_int-phi-reg-pressure-20170221.txt --]
[-- Type: text/plain, Size: 676 bytes --]

From ea74dcacc97e4aee0de952dc0142d71502cc5252 Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Tue, 7 Mar 2017 16:26:27 +0000
Subject: [PATCH 28/33] skip-non_int-phi-reg-pressure-20170221.txt

---
 gcc/tree-ssa-loop-ivopts.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 0b9170c..db8254c 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5583,6 +5583,9 @@ determine_set_costs (struct ivopts_data *data)
       if (get_iv (data, op))
 	continue;
 
+      if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
+	continue;
+
       n++;
     }
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
  2017-04-18 10:53 [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure Bin Cheng
@ 2017-04-26 13:51 ` Richard Biener
  2017-04-26 14:01   ` Bin.Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2017-04-26 13:51 UTC (permalink / raw)
  To: Bin Cheng; +Cc: gcc-patches, nd

On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> Given only integer variables are meaningful for register pressure estimation in IVOPTs,
> this patch skips non-integer type PHIs when counting register pressure.
> Is it OK?

Huh.  I suppose it only makes a difference because you are ignoring
POINTER_TYPE_P
IVs?  At least I would be surprised if get_iv returns true for float
or vector PHIs (yeah, see
early out in get_iv)?  So why exclude POINTER_TYPE_P IVs?

Richard.

> Thanks,
> bin
>
> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
>
>         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
>         when counting register pressure.
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
  2017-04-26 13:51 ` Richard Biener
@ 2017-04-26 14:01   ` Bin.Cheng
  2017-04-26 14:30     ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Bin.Cheng @ 2017-04-26 14:01 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>> Hi,
>> Given only integer variables are meaningful for register pressure estimation in IVOPTs,
>> this patch skips non-integer type PHIs when counting register pressure.
>> Is it OK?
>
> Huh.  I suppose it only makes a difference because you are ignoring
> POINTER_TYPE_P
> IVs?  At least I would be surprised if get_iv returns true for float
> or vector PHIs (yeah, see
> early out in get_iv)?  So why exclude POINTER_TYPE_P IVs?
Hmm, but if get_iv returns non-NULL, the phi won't be counted because
loop is continued?  Actually, all IV and invariants are skipped by
checking get_iv, so this is only to skip floating point phis.

Thanks,
bin
>
> Richard.
>
>> Thanks,
>> bin
>>
>> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
>>
>>         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
>>         when counting register pressure.
>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
  2017-04-26 14:01   ` Bin.Cheng
@ 2017-04-26 14:30     ` Richard Biener
  2017-04-26 16:33       ` Bin.Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Biener @ 2017-04-26 14:30 UTC (permalink / raw)
  To: Bin.Cheng; +Cc: gcc-patches

On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>>> Hi,
>>> Given only integer variables are meaningful for register pressure estimation in IVOPTs,
>>> this patch skips non-integer type PHIs when counting register pressure.
>>> Is it OK?
>>
>> Huh.  I suppose it only makes a difference because you are ignoring
>> POINTER_TYPE_P
>> IVs?  At least I would be surprised if get_iv returns true for float
>> or vector PHIs (yeah, see
>> early out in get_iv)?  So why exclude POINTER_TYPE_P IVs?
> Hmm, but if get_iv returns non-NULL, the phi won't be counted because
> loop is continued?  Actually, all IV and invariants are skipped by
> checking get_iv, so this is only to skip floating point phis.

Err, but AFAICS get_iv will return non-NULL for POINTER_TYPE_P IVs
which you then skip by your added

+      if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
+       continue;

thus float IVs are always skipped by means if get_iv returning NULL.

Oh, the get_iv check continues for non-NULL result ... so it makes sense.
But still, why exclude POINTER_TYPE_P non-IV ops?

Richard.

> Thanks,
> bin
>>
>> Richard.
>>
>>> Thanks,
>>> bin
>>>
>>> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
>>>
>>>         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
>>>         when counting register pressure.
>>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
  2017-04-26 14:30     ` Richard Biener
@ 2017-04-26 16:33       ` Bin.Cheng
  2017-05-04 15:41         ` Bin.Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: Bin.Cheng @ 2017-04-26 16:33 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

On Wed, Apr 26, 2017 at 3:23 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>> On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>>> On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>>>> Hi,
>>>> Given only integer variables are meaningful for register pressure estimation in IVOPTs,
>>>> this patch skips non-integer type PHIs when counting register pressure.
>>>> Is it OK?
>>>
>>> Huh.  I suppose it only makes a difference because you are ignoring
>>> POINTER_TYPE_P
>>> IVs?  At least I would be surprised if get_iv returns true for float
>>> or vector PHIs (yeah, see
>>> early out in get_iv)?  So why exclude POINTER_TYPE_P IVs?
>> Hmm, but if get_iv returns non-NULL, the phi won't be counted because
>> loop is continued?  Actually, all IV and invariants are skipped by
>> checking get_iv, so this is only to skip floating point phis.
>
> Err, but AFAICS get_iv will return non-NULL for POINTER_TYPE_P IVs
> which you then skip by your added
>
> +      if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
> +       continue;
>
> thus float IVs are always skipped by means if get_iv returning NULL.
>
> Oh, the get_iv check continues for non-NULL result ... so it makes sense.
> But still, why exclude POINTER_TYPE_P non-IV ops?
POINTER_TYPE_P is simply an overlook,  will update patch.

Thanks,
bin
>
> Richard.
>
>> Thanks,
>> bin
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>> bin
>>>>
>>>> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
>>>>
>>>>         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
>>>>         when counting register pressure.
>>>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
  2017-04-26 16:33       ` Bin.Cheng
@ 2017-05-04 15:41         ` Bin.Cheng
  2017-05-08 11:53           ` Richard Biener via gcc-patches
  0 siblings, 1 reply; 7+ messages in thread
From: Bin.Cheng @ 2017-05-04 15:41 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1895 bytes --]

On Wed, Apr 26, 2017 at 3:32 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Wed, Apr 26, 2017 at 3:23 PM, Richard Biener
> <richard.guenther@gmail.com> wrote:
>> On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>>> On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener
>>> <richard.guenther@gmail.com> wrote:
>>>> On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>>>>> Hi,
>>>>> Given only integer variables are meaningful for register pressure estimation in IVOPTs,
>>>>> this patch skips non-integer type PHIs when counting register pressure.
>>>>> Is it OK?
>>>>
>>>> Huh.  I suppose it only makes a difference because you are ignoring
>>>> POINTER_TYPE_P
>>>> IVs?  At least I would be surprised if get_iv returns true for float
>>>> or vector PHIs (yeah, see
>>>> early out in get_iv)?  So why exclude POINTER_TYPE_P IVs?
>>> Hmm, but if get_iv returns non-NULL, the phi won't be counted because
>>> loop is continued?  Actually, all IV and invariants are skipped by
>>> checking get_iv, so this is only to skip floating point phis.
>>
>> Err, but AFAICS get_iv will return non-NULL for POINTER_TYPE_P IVs
>> which you then skip by your added
>>
>> +      if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
>> +       continue;
>>
>> thus float IVs are always skipped by means if get_iv returning NULL.
>>
>> Oh, the get_iv check continues for non-NULL result ... so it makes sense.
>> But still, why exclude POINTER_TYPE_P non-IV ops?
> POINTER_TYPE_P is simply an overlook,  will update patch.
Here is updated version picking up POINTER_TYPE_P.

Thanks,
bin
>
> Thanks,
> bin
>>
>> Richard.
>>
>>> Thanks,
>>> bin
>>>>
>>>> Richard.
>>>>
>>>>> Thanks,
>>>>> bin
>>>>>
>>>>> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
>>>>>
>>>>>         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
>>>>>         when counting register pressure.
>>>>>

[-- Attachment #2: 0028-skip-non_int-phi-reg-pressure-20170401.txt --]
[-- Type: text/plain, Size: 718 bytes --]

From 9c2d8f5f3b749863bcb9a32ff3a520a8d3eda9f1 Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Tue, 7 Mar 2017 16:26:27 +0000
Subject: [PATCH 26/33] skip-non_int-phi-reg-pressure-20170401.txt

---
 gcc/tree-ssa-loop-ivopts.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 205d118..8d6adfe 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5579,6 +5579,10 @@ determine_set_costs (struct ivopts_data *data)
       if (get_iv (data, op))
 	continue;
 
+      if (!POINTER_TYPE_P (TREE_TYPE (op))
+	  && !INTEGRAL_TYPE_P (TREE_TYPE (op)))
+	continue;
+
       n++;
     }
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure
  2017-05-04 15:41         ` Bin.Cheng
@ 2017-05-08 11:53           ` Richard Biener via gcc-patches
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Biener via gcc-patches @ 2017-05-08 11:53 UTC (permalink / raw)
  To: Bin.Cheng; +Cc: gcc-patches

On Thu, May 4, 2017 at 5:33 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Wed, Apr 26, 2017 at 3:32 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>> On Wed, Apr 26, 2017 at 3:23 PM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>>> On Wed, Apr 26, 2017 at 3:37 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>>>> On Wed, Apr 26, 2017 at 2:32 PM, Richard Biener
>>>> <richard.guenther@gmail.com> wrote:
>>>>> On Tue, Apr 18, 2017 at 12:52 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
>>>>>> Hi,
>>>>>> Given only integer variables are meaningful for register pressure estimation in IVOPTs,
>>>>>> this patch skips non-integer type PHIs when counting register pressure.
>>>>>> Is it OK?
>>>>>
>>>>> Huh.  I suppose it only makes a difference because you are ignoring
>>>>> POINTER_TYPE_P
>>>>> IVs?  At least I would be surprised if get_iv returns true for float
>>>>> or vector PHIs (yeah, see
>>>>> early out in get_iv)?  So why exclude POINTER_TYPE_P IVs?
>>>> Hmm, but if get_iv returns non-NULL, the phi won't be counted because
>>>> loop is continued?  Actually, all IV and invariants are skipped by
>>>> checking get_iv, so this is only to skip floating point phis.
>>>
>>> Err, but AFAICS get_iv will return non-NULL for POINTER_TYPE_P IVs
>>> which you then skip by your added
>>>
>>> +      if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
>>> +       continue;
>>>
>>> thus float IVs are always skipped by means if get_iv returning NULL.
>>>
>>> Oh, the get_iv check continues for non-NULL result ... so it makes sense.
>>> But still, why exclude POINTER_TYPE_P non-IV ops?
>> POINTER_TYPE_P is simply an overlook,  will update patch.
> Here is updated version picking up POINTER_TYPE_P.

Ok.

Richard.

> Thanks,
> bin
>>
>> Thanks,
>> bin
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>> bin
>>>>>
>>>>> Richard.
>>>>>
>>>>>> Thanks,
>>>>>> bin
>>>>>>
>>>>>> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
>>>>>>
>>>>>>         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
>>>>>>         when counting register pressure.
>>>>>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-08 11:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 10:53 [PATCH GCC8][28/33]Don't count non-interger PHIs for register pressure Bin Cheng
2017-04-26 13:51 ` Richard Biener
2017-04-26 14:01   ` Bin.Cheng
2017-04-26 14:30     ` Richard Biener
2017-04-26 16:33       ` Bin.Cheng
2017-05-04 15:41         ` Bin.Cheng
2017-05-08 11:53           ` Richard Biener via gcc-patches

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).