On Fri, Apr 27, 2012 at 5:02 AM, Martin Jambor <mjam...@suse.cz> wrote: > Hi, > > On Tue, Apr 24, 2012 at 12:31:38PM +0200, Martin Jambor wrote: >> Hi, >> >> On Mon, Apr 23, 2012 at 03:30:19PM +0200, Richard Guenther wrote: >> > On Mon, 23 Apr 2012, Martin Jambor wrote: >> > >> > > Hi, >> > > >> > > On Mon, Apr 23, 2012 at 12:50:51PM +0200, Richard Guenther wrote: >> > > > On Fri, 20 Apr 2012, Martin Jambor wrote: >> > > > >> > > > > Hi, >> > > > > >> > > > > two days ago I talked to Richi on IRC about the functions to >> > > > > determine >> > > > > the expected alignment of objects and pointers we have and he >> > > > > suggested that get_object_alignment_1 and get_pointer_alignment_1 >> > > > > should return whether the alignment is actually known and return the >> > > > > actual alignment in a reference variable (as they currently return >> > > > > bitpos). >> > > > > >> > ... > >> The testsuite differences I got on Friday were probably noise, tonight >> (on an updated svn tree) I did not get any on ppc64-linux, >> x86_64-linux or i686-linux. Considering that and the OK above, I'm >> going to bootstrap and test also on sparc64-linux and ia64-linux and >> if those pass too, I'll commit the patch tomorrow, unless there are >> any objections. >> > > There is a Fortran testsuite that, on sparc64-linux, showed that my > clever simplification of get_object_alignment_1 handling of > TARGET_MEM_REFs was actually very dumb. So this is the working patch, > successfully bootstrapped and tested on x86_64-linux (all languages > and Ada), i686-linux (likewise), sparc64-linux (all languages - Java + > Ada), ia64-linux (all languages) and ppc64-linux (likewise) and tested > on hppa-linux (C and C++ only). > > I still consider the patch approved because it actually changes less > stuff but do not want to commit it before a weekend so intend to do it > next week. > > Thanks, > > Martin > > > 2012-04-25 Martin Jambor <mjam...@suse.cz> > > * builtins.c (get_object_alignment_1): Return whether we can determine > the alignment or conservatively assume byte alignment. Return the > alignment by reference. Use get_pointer_alignment_1 for dereference > alignment. > (get_pointer_alignment_1): Return whether we can determine the > alignment or conservatively assume byte alignment. Return the > alignment by reference. Use get_ptr_info_alignment to get SSA name > alignment. > (get_object_alignment): Update call to get_object_alignment_1. > (get_object_or_type_alignment): Likewise, fall back to type alignment > only when it returned false. > (get_pointer_alignment): Update call to get_pointer_alignment_1. > * fold-const.c (get_pointer_modulus_and_residue): Update call to > get_object_alignment_1. > * ipa-prop.c (ipa_modify_call_arguments): Update call to > get_pointer_alignment_1. > * tree-sra.c (build_ref_for_offset): Likewise, fall back to the type > of MEM_REF or TARGET_MEM_REF only when it returns false. > * tree-ssa-ccp.c (get_value_from_alignment): Update call to > get_object_alignment_1. > (ccp_finalize): Use set_ptr_info_alignment. > * tree.h (get_object_alignment_1): Update declaration. > (get_pointer_alignment_1): Likewise. > * gimple-pretty-print.c (dump_gimple_phi): Use get_ptr_info_alignment. > (dump_gimple_stmt): Likewise. > * tree-flow.h (ptr_info_def): Updated comments of fields align and > misalign. > (get_ptr_info_alignment): Declared. > (mark_ptr_info_alignment_unknown): Likewise. > (set_ptr_info_alignment): Likewise. > (adjust_ptr_info_misalignment): Likewise. > * tree-ssa-address.c (copy_ref_info): Use new access functions to get > and set alignment of SSA names. > * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Call > mark_ptr_info_alignment_unknown. > * tree-ssanames.c (get_ptr_info_alignment): New function. > (mark_ptr_info_alignment_unknown): Likewise. > (set_ptr_info_alignment): Likewise. > (adjust_ptr_info_misalignment): Likewise. > (get_ptr_info): Call mark_ptr_info_alignment_unknown. > * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): > Likewise. > (bump_vector_ptr): Likewise. > * tree-vect-stmts.c (create_array_ref): Use set_ptr_info_alignment. > (vectorizable_store): Likewise. > (vectorizable_load): Likewise. > >
This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53338 -- H.J.