[PATCH] Fix PR tree-optimization/32589
Eric Botcazou
ebotcazou@adacore.com
Tue Jul 10 10:36:00 GMT 2007
Hi,
This is the Ada bootstrap failure on 32-bit platforms, see
http://gcc.gnu.org/ml/gcc/2007-07/msg00070.html
To recap, FRE may create non-GIMPLE expressions that are nevertheless accepted
by the predicates in tree-gimple.c, so they cannot be re-gimplified later by
the existing mechanisms.
As suggested by Diego, a first approach would be to create is_gimple_const and
use it instead of is_gimple_[min_]invariant when it makes sense to do so.
The problem, as I found out when trying to implement it, is the last part of
the previous sentence: IMHO it is not clear at all when is_gimple_const
should be used instead of is_gimple_[min_]invariant in the tree optimizers.
I don't have the big picture here so I cannot really formulate anything.
The second approach is described in passes.c:
/* Note that the folders should only create gimple expressions.
This is a hack until the new folder is ready. */
in_gimple_form = (cfun && (cfun->curr_properties & PROP_trees)) != 0;
and is of course much more straightforward, hence the proposed patch.
Bootstrapped/regtested on i586-suse-linux, but the Ada library cannot be built
because of another problem in tree-ssa-sccvn.c (PR tree-opt/32713).
OK for mainline?
2007-07-10 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/32589
* Makefile.in (fold-const.o): Add dependency on TREE_GIMPLE_H.
* fold-const.c: Include tree-gimple.h.
(try_move_mult_to_index): If in GIMPLE form, do not synthesize
non-GIMPLE index.
* tree-gimple.c (is_gimple_min_invariant): Clarify head comment.
* doc/tree-ssa.texi (Rough GIMPLE Grammar): Add missing rule.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr32589.diff
Type: text/x-diff
Size: 2898 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070710/56bb468a/attachment.bin>
More information about the Gcc-patches
mailing list