This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Make PRE handle globals
On 7/7/07, Andreas Schwab <schwab@suse.de> wrote:
"Daniel Berlin" <dberlin@dberlin.org> writes:
> 2007-07-06 Daniel Berlin <dberlin@dberlin.org>
>
> * tree-ssa-sccvn.c (expr_has_constants): Handle tcc_declaration.
> (try_to_simplify): Ditto.
> (visit_use): Ditto.
> * tree-vn.c (set_value_handle): Use decl_vh_map for decl value
> handles.
> * tree-flow-inline.h (get_value_handle): Ditto.
> * tree-ssa-pre.c (decl_vh_map): New.
> (decl_node_pool): New.
> (can_value_number_operation): Support DECL_P.
> (can_PRE_operation): Ditto.
> (create_expression_by_pieces): Ditto.
> (find_existing_value_expr): Modify to differnetiate between
> addressing and top level.
> (create_value_handle_for_expr): Handle DECL's.
> (poolify_tree): Ditto.
> (make_values_for_phi): Don't insert into PHI_GEN during FRE.
> (make_values_for_stmt): Handle DECL's properly.
> (init_pre): Reorg to not init useless things during FRE.
> (fini_pre): Ditto.
> * tree-flow.h: Include pointer-set.h.
> (decl_vh_map): Declare.
> * Makefile.in (TREE_FLOW_H): Add pointer-set.h
This is causing a bootstrap failure on ia64.
Ugh, do you have a small testcase?
To be honest, the contortions required to do this were pretty ugly,,
and i'm not really pleased with them.
If this isn't an obvious bug, i'll probably revert the patch and just
wait till I finish reworking the IR PRE uses.