Message ID | 001e01cdcd0a$56dd4080$0497c180$@cheng@arm.com |
---|---|
State | New |
Headers | show |
> -----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.
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)