[PATCH] Simplified alias-export (final)
Richard Guenther
rguenther@suse.de
Tue Jul 14 14:34:00 GMT 2009
On Tue, 14 Jul 2009, H.J. Lu wrote:
> On Mon, Jul 13, 2009 at 7:16 AM, Richard Guenther<rguenther@suse.de> wrote:
> >
> > This is the final version of a simplified alias-export. Â Alias-export
> > in the sense that points-to information is transitioned over to RTL
> > by means of keeping all base objects in MEM_EXPR, including INDIRECT_REFs
> > of pointer SSA_NAMEs. Â In another sense the patch opens the path to
> > remove overlapping parts of the RTL and the tree alias-oracles as
> > it simply queries the tree alias-oracle with the information from the
> > MEM_EXPRs after the RTL oracle is finished.
> >
> > The patch consistently improves SPEC 2006 on x86_64 for me
> > (to my surprise), not by a large margin though. Â It is a wash for Itanium
> > where I expected a much bigger effect.
> >
> > The patch fixes the regression I introduced while "fixing" restrict.
> > The fix caused restrict information to no longer be available on RTL.
> >
> > The worst-case memory and compile-time effects on our regular testers
> > was on tramp3d with -fprofile-generate, so I re-checked that numbers
> > after this final cleanup. Â Numbers now show a (probably in the noise)
> > improvement in compile-time and a 0.0004% increase in peak VM memory
> > usage. Â A memory usage increase is expected as we now keep SSA operands
> > and points-to sets over the whole RTL compilation and because as
> > the MEM_EXPRs retain all their base information mem-attr sharing should
> > be less efficient. Â But as RTL is function-at-a-time I choose to care
> > less.
> >
> > Re-bootstrapped and tested on x86_64-unknown-linux-gnu. Â If there are
> > no comments I'll apply this somewhen tomorrow.
> >
> > Thanks,
> > Richard.
> >
> > 2009-07-13  Richard Guenther  <rguenther@suse.de>
> > Â Â Â Â Andrey Belevantsev <abel@ispras.ru>
> >
> > Â Â Â Â * tree-ssa-alias.h (refs_may_alias_p_1): Declare.
> > Â Â Â Â (pt_solution_set): Likewise.
> > Â Â Â Â * tree-ssa-alias.c (refs_may_alias_p_1): Export.
> > Â Â Â Â * tree-ssa-structalias.c (pt_solution_set): New function.
> > Â Â Â Â * final.c (rest_of_clean_state): Free SSA data structures.
> > Â Â Â Â * print-rtl.c (print_decl_name): Remove.
> > Â Â Â Â (print_mem_expr): Implement in terms of print_generic_expr.
> > Â Â Â Â * alias.c (ao_ref_from_mem): New function.
> > Â Â Â Â (rtx_refs_may_alias_p): Likewise.
> > Â Â Â Â (true_dependence): Query alias-export info.
> > Â Â Â Â (canon_true_dependence): Likewise.
> > Â Â Â Â (write_dependence_p): Likewise.
> > Â Â Â Â * tree-dfa.c (get_ref_base_and_extent): For void types leave
> > Â Â Â Â size unknown.
> > Â Â Â Â * emit-rtl.c (component_ref_for_mem_expr): Remove.
> > Â Â Â Â (mem_expr_equal_p): Use operand_equal_p.
> > Â Â Â Â (set_mem_attributes_minus_bitpos): Do not use
> > Â Â Â Â component_ref_for_mem_expr.
> > Â Â Â Â * cfgexpand.c (add_partitioned_vars_to_ptset): New function.
> > Â Â Â Â (update_alias_info_with_stack_vars): Likewise.
> > Â Â Â Â (partition_stack_vars): Call update_alias_info_with_stack_vars.
> > Â Â Â Â * tree-ssa.c (delete_tree_ssa): Do not release SSA names
> > Â Â Â Â explicitly nor clear stmt operands.
> > Â Â Â Â Free the decl-to-pointer map.
> > Â Â Â Â * tree-optimize.c (execute_free_datastructures): Do not free
> > Â Â Â Â SSA data structures here.
> > Â Â Â Â * tree-flow.h (struct gimple_df): Add decls_to_pointers member.
> > Â Â Â Â * Makefile.in (emit-rtl.o): Add pointer-set.h dependency.
> > Â Â Â Â (alias.o): Add tree-ssa-alias.h, pointer-set.h and $(TREE_FLOW_H)
> > Â Â Â Â dependencies.
> > Â Â Â Â (print-rtl.o): Add $(DIAGNOSTIC_H) dependency.
> >
>
> This caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40745
The following obvious patch fixes this. The issue is that at -O0
we keep unused variables, parition them but do not bother to record
them in referenced_vars.
Richard.
2009-07-14 Richard Guenther <rguenther@suse.de>
PR middle-end/40745
* cfgexpand.c (partition_stack_vars): Do not bother to update
alias information when not optimizing.
Index: gcc/cfgexpand.c
===================================================================
*** gcc/cfgexpand.c (revision 149624)
--- gcc/cfgexpand.c (working copy)
*************** partition_stack_vars (void)
*** 1031,1037 ****
}
}
! update_alias_info_with_stack_vars ();
}
/* A debugging aid for expand_used_vars. Dump the generated partitions. */
--- 1031,1038 ----
}
}
! if (optimize)
! update_alias_info_with_stack_vars ();
}
/* A debugging aid for expand_used_vars. Dump the generated partitions. */
More information about the Gcc-patches
mailing list