This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch fixes the over-conservativeness in the aliasing information that the vectorizer sets for the vector pointers it creates. Instead of blindly adding all the subvars as may-aliases of the new tag, we call get_ref_base_and_extent and overlap_subvar to add only the potentially overlapping subvars as may-aliases of the new tag. Looking at the resulting vops created for the vector store in the attached testcase, you can see that with this patch only the one relevant subvar appears as a virtual def: # SFT.33_52 = V_MAY_DEF <SFT.33_85>; MEM[base: D.2686_175] = vect_cst_.79_103; instead of all the subvars before: # SFT.29_132 = V_MAY_DEF <SFT.29_110>; # SFT.30_133 = V_MAY_DEF <SFT.30_114>; # SFT.31_134 = V_MAY_DEF <SFT.31_118>; # SFT.32_135 = V_MAY_DEF <SFT.32_122>; # SFT.33_136 = V_MAY_DEF <SFT.33_85>; # SFT.34_137 = V_MAY_DEF <SFT.34_128>; MEM[base: D.2686_4] = vect_cst_.79_103; Bootsrapped on powerpc-linux and tested on the vectorizer testcases. I couldn't test bootstrap with vectorization enabled because of the failure described here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26197#c11 Comments? thanks, dorit * tree-ssa-alias.c (new_type_alias): Takes additional argument. Calls get_ref_base_and_extent and overlap_subvar to add only relevant subvars as may-aliases. * tree-vect-transform.c (vect_create_data_ref_ptr): Call new_type_alias with additional argument. * tree-flow.h (new_type_alias): Takes additional argument. (See attached file: vect_improved_aliasing.patch.txt) (See attached file: vect-test.c) Richard Guenther <rguenther@suse.de> wrote on 12/01/2006 16:11:32: > On Thu, 12 Jan 2006, Dorit Nuzman wrote: > > > Does this patch make sense? > > > > The patch introduces one change to the function that creates new type-tags > > for the newly created vector pointers: instead of adding all the subvars of > > 'var' as may-aliases of the new tag, we add only the subvar whose offset is > > equal to 'field_bit_offset' (a new argument to the function). > > You should use get_ref_base_and_extent () to find the range of possible > uses and add all subvars that offset_overlaps_with_access (). You can > look at get_constraint_for_component_ref () to get an idea how this > should work (though that fn only adds the first subvar found). > > Richard.
Attachment:
vect_improved_aliasing.patch.txt
Description: Text document
Attachment:
vect-test.c
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |