This is the mail archive of the
mailing list for the GCC project.
Re: New SRA implementation
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: rth at redhat dot com (Richard Henderson)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jun 2004 13:03:57 -0400 (EDT)
- Subject: Re: New SRA implementation
> The previous SRA implementation had two unfortunate restrictions.
> First, it couldn't handle nested aggregates, which severely limited
> its usefullness when it comes to real-world code. Including that
> within gcc itself, e.g. block_stmt_iterator.
> Second, it had a hard-coded limit of five fields per aggregate.
> This is a complete rewrite to address both of these issues. Nested
> structures are handled. Arrays are handled. Arbitrary numbers of
> fields are handled.
> Extending to arbitrary numbers of fields means that we have to have
> a good deal more smarts in deciding whether or not to instantiate
> the fields. I've come up with some preliminary heuristics that seem
> to be not unreasonable, at least for the code within gcc and its
> testsuites. Surely more work is required here.
> I havn't been able to measure a speed difference between the new and
> old implementation that wasn't less than 1%, but for the record,
> bootstrap with the new implementation was u+s 175 out of 19181 seconds
> faster to bootstrap.
MOVE_RATIO is not defined for many targets except when including expr.h.
This patch fixes this bootstrap failure.
Committed as obvious as it gets me passed this failure.
2004-06-29 Andrew Pinski <email@example.com>
* tree-sra.c: Include expr.h for definition of MOVE_RATIO.
* Makefile.in (tree-sra.c): Update dependencies.
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1309
diff -u -p -r1.1309 Makefile.in
--- Makefile.in 28 Jun 2004 18:27:02 -0000 1.1309
+++ Makefile.in 29 Jun 2004 17:02:09 -0000
@@ -1890,7 +1890,7 @@ tree-ssa-ccp.o : tree-ssa-ccp.c $(CONFIG
tree-sra.o : tree-sra.c $(CONFIG_H) system.h errors.h $(TREE_H) $(RTL_H) \
$(TM_P_H) $(TREE_FLOW_H) diagnostic.h tree-inline.h \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_GIMPLE_H) \
- langhooks.h tree-pass.h $(FLAGS_H)
+ langhooks.h tree-pass.h $(FLAGS_H) $(EXPR_H)
tree-complex.o : tree-complex.c $(CONFIG_H) system.h $(TREE_H) \
$(TM_H) $(TREE_FLOW_H) $(TREE_GIMPLE_H) tree-iterator.h tree-pass.h \
RCS file: /cvs/gcc/gcc/gcc/tree-sra.c,v
retrieving revision 2.10
diff -u -p -r2.10 tree-sra.c
--- tree-sra.c 29 Jun 2004 16:25:27 -0000 2.10
+++ tree-sra.c 29 Jun 2004 17:02:09 -0000
@@ -46,6 +46,8 @@ Software Foundation, 59 Temple Place - S
+/* expr.h is needed for MOVE_RATIO. */
/* This object of this pass is to replace a non-addressable aggregate with a