This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New code size estimate

On Mon, 28 Feb 2005, Steven Bosscher wrote:

> Ref:
> > 	* tree-inline.c (estimate_num_insns_1): Ignore stores to decls with
> > 	ignored flag set.
> Someone still has to explain why this makes sense.  All large
> expressions will now suddenly look really small, if I understand
> this change correctly.  For example, say you have,
> x = a + b + c + d + e + .... + z;
> then the equivalent GIMPLE will look something like,
> t2 = a + b;
> t3 = t2 + c;
> ...
> ...
> x = t25 + z;
> and all the "t[0-9]+" temporaries would result in real code being
> generated, but their assignments would be ignored if this patch is
> applied, because all temporaries would have DECL_IGNORED set on
> them.  Ignoring them would be not quite sane IMHO. Am I missing
> something here?

Sorry to followup myself again, there are certainly ways to improve
estimate_num_insns - f.i. we assign the same cost (1) to EXPR nodes
with any number of arguments, while it may be better (if we are
no longer counting those virtual stores) to assign 1 to NEGATE_EXPR
and 2 to ADD_EXPR, f.i., it also doesn't make much sense in my
view to assign 10 to RDIV_EXPR (for a code size estimate).  But
changing too much at once is probably not a good idea.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]