public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
@ 2012-11-27 10:10 Bin Cheng
  2012-11-27 18:02 ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Cheng @ 2012-11-27 10:10 UTC (permalink / raw)
  To: gcc-patches

Hi,
I committed the patch implementing register pressure directed hoist in TRUNK
and enabled the option "-fira-hoist-pressure" for all targets by reviewer's
suggestion, although it has no obvious effect on Thumb2/x86/x86_64. Now I
collected performance data with Os and found it causes performance
regression in some cases on Thumb2, so this patch disables the option on
Thumb2 and modify the corresponding test cases.

Tested on arm-none-eabi/M3, is it OK?

Thanks.


2012-11-21  Bin Cheng  <bin.cheng@arm.com>

	* config/arm/arm.c (arm_option_override): Disable option
	-fira-hoist-pressure on Thumb2.

2012-11-21  Bin Cheng  <bin.cheng@arm.com>

	* gcc.dg/hoist-register-pressure-1.c: Skip on ARM Thumb2.
	* gcc.dg/hoist-register-pressure-2.c: Ditto.
	* gcc.dg/hoist-register-pressure-3.c: Ditto.




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

* Re: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
  2012-11-27 10:10 [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2 Bin Cheng
@ 2012-11-27 18:02 ` Richard Earnshaw
  2012-11-28  1:48   ` Bin Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Earnshaw @ 2012-11-27 18:02 UTC (permalink / raw)
  To: Bin Cheng; +Cc: gcc-patches

On 27/11/12 10:10, Bin Cheng wrote:
> Hi,
> I committed the patch implementing register pressure directed hoist in TRUNK
> and enabled the option "-fira-hoist-pressure" for all targets by reviewer's
> suggestion, although it has no obvious effect on Thumb2/x86/x86_64. Now I
> collected performance data with Os and found it causes performance
> regression in some cases on Thumb2, so this patch disables the option on
> Thumb2 and modify the corresponding test cases.
>
> Tested on arm-none-eabi/M3, is it OK?
>
> Thanks.
>
>
> 2012-11-21  Bin Cheng  <bin.cheng@arm.com>
>
> 	* config/arm/arm.c (arm_option_override): Disable option
> 	-fira-hoist-pressure on Thumb2.
>
> 2012-11-21  Bin Cheng  <bin.cheng@arm.com>
>
> 	* gcc.dg/hoist-register-pressure-1.c: Skip on ARM Thumb2.
> 	* gcc.dg/hoist-register-pressure-2.c: Ditto.
> 	* gcc.dg/hoist-register-pressure-3.c: Ditto.
>
>
>
>
>

No patch.

R.

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

* RE: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
  2012-11-27 18:02 ` Richard Earnshaw
@ 2012-11-28  1:48   ` Bin Cheng
  2012-11-30  9:59     ` Bin Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Cheng @ 2012-11-28  1:48 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: gcc-patches

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

> -----Original Message-----
> From: Richard Earnshaw
> Sent: Wednesday, November 28, 2012 2:02 AM
> To: Bin Cheng
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
> 
> On 27/11/12 10:10, Bin Cheng wrote:
> > Hi,
> > I committed the patch implementing register pressure directed hoist in
> > TRUNK and enabled the option "-fira-hoist-pressure" for all targets by
> > reviewer's suggestion, although it has no obvious effect on
> > Thumb2/x86/x86_64. Now I collected performance data with Os and found
> > it causes performance regression in some cases on Thumb2, so this
> > patch disables the option on
> > Thumb2 and modify the corresponding test cases.
> >
> > Tested on arm-none-eabi/M3, is it OK?
> >
> > Thanks.
> >
> >
> > 2012-11-21  Bin Cheng  <bin.cheng@arm.com>
> >
> > 	* config/arm/arm.c (arm_option_override): Disable option
> > 	-fira-hoist-pressure on Thumb2.
> >
> > 2012-11-21  Bin Cheng  <bin.cheng@arm.com>
> >
> > 	* gcc.dg/hoist-register-pressure-1.c: Skip on ARM Thumb2.
> > 	* gcc.dg/hoist-register-pressure-2.c: Ditto.
> > 	* gcc.dg/hoist-register-pressure-3.c: Ditto.
> >
> >
> >
> >
> >
> 
> No patch.

Very sorry for missing the patch.

Thanks.

[-- Attachment #2: disable-reg-pressure-hoist-thumb2-20121121.txt --]
[-- Type: text/plain, Size: 2527 bytes --]

Index: gcc/testsuite/gcc.dg/hoist-register-pressure-1.c
===================================================================
--- gcc/testsuite/gcc.dg/hoist-register-pressure-1.c	(revision 193687)
+++ gcc/testsuite/gcc.dg/hoist-register-pressure-1.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-options "-Os -fdump-rtl-hoist" }  */
-/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { nonpic } } } } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { nonpic && { ! arm_thumb2 } } } } } */
 /* { dg-final { cleanup-rtl-dump "hoist" } } */
 
 #define BUF 100
Index: gcc/testsuite/gcc.dg/hoist-register-pressure-2.c
===================================================================
--- gcc/testsuite/gcc.dg/hoist-register-pressure-2.c	(revision 193687)
+++ gcc/testsuite/gcc.dg/hoist-register-pressure-2.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-options "-Os -fdump-rtl-hoist" }  */
-/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { ! arm_thumb2 } } } } */
 /* { dg-final { cleanup-rtl-dump "hoist" } } */
 
 #define BUF 100
Index: gcc/testsuite/gcc.dg/hoist-register-pressure-3.c
===================================================================
--- gcc/testsuite/gcc.dg/hoist-register-pressure-3.c	(revision 193687)
+++ gcc/testsuite/gcc.dg/hoist-register-pressure-3.c	(working copy)
@@ -1,5 +1,5 @@
 /* { dg-options "-Os -fdump-rtl-hoist" }  */
-/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { ! arm_thumb2 } } } } */
 /* { dg-final { cleanup-rtl-dump "hoist" } } */
 
 #define BUF 100
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 193687)
+++ gcc/config/arm/arm.c	(working copy)
@@ -2027,6 +2027,12 @@ arm_option_override (void)
   else
     max_insns_skipped = current_tune->max_insns_skipped;
 
+  if (TARGET_THUMB2 && flag_ira_hoist_pressure)
+    {
+      /* Don't do register pressure directed hoist on Thumb2.  */
+      flag_ira_hoist_pressure = 0;
+    }
+
   /* Hot/Cold partitioning is not currently supported, since we can't
      handle literal pool placement in that case.  */
   if (flag_reorder_blocks_and_partition)

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

* RE: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
  2012-11-28  1:48   ` Bin Cheng
@ 2012-11-30  9:59     ` Bin Cheng
  0 siblings, 0 replies; 4+ messages in thread
From: Bin Cheng @ 2012-11-30  9:59 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: gcc-patches



> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-owner@gcc.gnu.org]
On
> Behalf Of Bin Cheng
> Sent: Wednesday, November 28, 2012 9:48 AM
> To: Richard Earnshaw
> Cc: gcc-patches@gcc.gnu.org
> Subject: RE: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
> 
> > -----Original Message-----
> > From: Richard Earnshaw
> > Sent: Wednesday, November 28, 2012 2:02 AM
> > To: Bin Cheng
> > Cc: gcc-patches@gcc.gnu.org
> > Subject: Re: [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2
> >
> > On 27/11/12 10:10, Bin Cheng wrote:
> > > Hi,
> > > I committed the patch implementing register pressure directed hoist
> > > in TRUNK and enabled the option "-fira-hoist-pressure" for all
> > > targets by reviewer's suggestion, although it has no obvious effect
> > > on Thumb2/x86/x86_64. Now I collected performance data with Os and
> > > found it causes performance regression in some cases on Thumb2, so
> > > this patch disables the option on
> > > Thumb2 and modify the corresponding test cases.
> > >
> > > Tested on arm-none-eabi/M3, is it OK?
> > >
> > > Thanks.
> > >
> > >
> > > 2012-11-21  Bin Cheng  <bin.cheng@arm.com>
> > >
> > > 	* config/arm/arm.c (arm_option_override): Disable option
> > > 	-fira-hoist-pressure on Thumb2.
> > >
> > > 2012-11-21  Bin Cheng  <bin.cheng@arm.com>
> > >
> > > 	* gcc.dg/hoist-register-pressure-1.c: Skip on ARM Thumb2.
> > > 	* gcc.dg/hoist-register-pressure-2.c: Ditto.
> > > 	* gcc.dg/hoist-register-pressure-3.c: Ditto.
> > >
> > >
> > >
> > >
> > >
> >
> > No patch.
> 
> Very sorry for missing the patch.
> 

Ping.



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

end of thread, other threads:[~2012-11-30  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-27 10:10 [PATCH ARM] Disable "-fira-hoist-pressure" on Thumb2 Bin Cheng
2012-11-27 18:02 ` Richard Earnshaw
2012-11-28  1:48   ` Bin Cheng
2012-11-30  9:59     ` Bin Cheng

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