Jakub Jelinek wrote on 21/11/2011 07:25:10 PM: > From: Jakub Jelinek > To: Razya Ladelsky/Haifa/IBM@IBMIL > Cc: GCC Patches , Richard Guenther > > Date: 21/11/2011 07:25 PM > Subject: Re: [PATCH, take 2] Fix PR tree-optimization/49960 ,Fix > self data dependence > > On Mon, Nov 21, 2011 at 06:56:55PM +0200, Razya Ladelsky wrote: > > I have some non-affine cases for which compute_affine_dependence is called > > (as it is called for > > ALL dependences from compte_all_depepndences()), and no harm is done. > > I looked a little bit closer into the code, and this is what happens for > > non affine accesses: > > > > initialize_data_dependence_relation() assigns > > DDR_ARE_DEPENDENT (res) = chrec_dont_know for the dr. > > It can be chrec_known too (that's actually the only interesting case for us > unless it is a read-read ddr), but you're right that likely > object_address_invariant_in_loop_p should be false. > > > Then, compute_affine_depepndence() > > tests if (DDR_ARE_DEPENDENT (ddr) == NULL_TREE), and does nothing > > otherwise. > > Since the dr was initialized with chrec_dont_know, no harm is done. > > > > Anyway, since it is useless for your gather case, I'll just remove it, > > along with compute_self_dependence(). > > > > OK? > > Yes, patch preapproved. > > Jakub > Hi, Going to commit this patch today. I bootstrapped and regtested on ppc64-suse-linux. ChangeLog: * tree-data-ref.c (initialize_data_dependence_relation): Update comment for the self dependence case. (compute_self_dependence): Remove. * tree-vect-data-refs.c (vect_analyze_data_refs): Remove call to compute_self_dependenc. Thanks, Razya