This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: BBRO on non-pipelined processors - bad?
- From: tm <tm at mail dot kloo dot net>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, law at redhat dot com, kazu at cs dot umass dot edu
- Date: Tue, 22 Oct 2002 13:58:04 -0700 (PDT)
- Subject: Re: BBRO on non-pipelined processors - bad?
On Tue, 22 Oct 2002, Richard Henderson wrote:
> On Fri, Oct 18, 2002 at 04:26:04PM -0700, tm wrote:
> > I'd like to create a target macro defined something like:
> >
> > #define CONSTANT_CYCLE_BRANCH 1
> >
> > ...and then we can do in toplev.c:
> >
> > #ifdef CACHE_LOG
> > if (!CONSTANT_CYCLE_BRANCH || CACHE_LOG)) {
> > (call bbro here)
> > }
> > #endif
> >
> > Is this acceptable?
>
> No. Use OPTIMIZATION_OPTIONS.
>
>
> r~
>
Ooops, sent the previous patch to the wrong group and people.
Okay, here's the patch to disable BBRO on the H8/300 series.
Here's a table of code sizes on my standard size benchmark
derived from stress-1.17:
.text section sizes (in hexadecimal):
file before after
-----------------------------------
* layer3.i 7b36 79d0
* l3bitstream.i 2a6a 29ec
* navion_aero.i 5c8 5c8
@ advdomestic.i 2302 2104
@ aiunit.i 55ea 53aa
@ chanserv.i e6c8 df84
@ melee2.i 62e4 608a
@ wizard1.i 4058 3e6e
+ adler32.i 19c 19c
+ blowfish.i 21ac 21a2
+ imdecode.i 22f22 220fc
+ map_fog.i a31e 9b84
+ scanline.i 1188 1188
+ tif_fax3.i 21c6 213a
. quantize.i 2c30 2b52
. tif_packbits.i 5bc 5a4
. s_serv.i 6b9a 6902
* = heavily floating-point testcase
@ = branchy testcase
+ = loopy testcase
. = mixed testcase
Patch is below.
Toshi
*** h8300.h.bak Tue Oct 22 09:54:15 2002
--- h8300.h Tue Oct 22 10:01:14 2002
*************** extern const char * const *h8_reg_names;
*** 66,71 ****
--- 66,79 ----
#define LIB_SPEC "%{mrelax:-relax} %{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+ #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \
+ do { \
+ /* Basic block reordering is only beneficial on targets \
+ with cache and/or variable-cycle branches where \
+ (cycle count taken != cycle count not taken). */ \
+ flag_reorder_blocks = 0; \
+ } while (0)
+
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (Hitachi H8/300)");