This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] Factor self-referential size trees into functions
- From: Paolo Bonzini <paolo dot bonzini at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Jun 2009 10:39:02 +0200
- Subject: Re: [Patch] Factor self-referential size trees into functions
- References: <firstname.lastname@example.org>
A nit: I don't like find_substitute_in_expr being in tree.c and I don't
like its name.
Also, maybe you want the function to be named SZ.%d instead of SZ%d just
for clarity in the gimple outputs with functions named SZ%d by the user
(you never know -- though maybe Ada functions are mangled?)
2. more aggressive propagation of TREE_READONLY in expressions. Expressions
cannot be factored out if they contain SAVE_EXPRs so superfluous SAVE_EXPRs
must be eliminated as much as possible by tracking the TREE_READONLYness.
If I understand the patch correctly, this is a one-liner and could be
submitted separately (personally, I would have no problem if the rest of
the patch was approved by an Ada maintainer, or if you just went ahead
and committed it).
This should only affect the Ada compiler (although I presume 2. can marginally
help the other compilers) and dramatically help for code with multiple levels
of discriminated types (for our favorite example at -O0: code size divided by
2 and compilation time by 4).
Roughly, what is the asymptotic complexity of multiple levels of
discriminated types? Would this patch help with problems like the one
you recently posted a patch for? (Just two curiosities).