Jakub Jelinek <ja...@redhat.com> wrote on 21/11/2011 03:59:15 PM: > From: Jakub Jelinek <ja...@redhat.com> > To: Razya Ladelsky/Haifa/IBM@IBMIL > Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Richard Guenther > <richard.guent...@gmail.com> > Date: 21/11/2011 03:59 PM > Subject: Re: [PATCH, take 2] Fix PR tree-optimization/49960 ,Fix > self data dependence > > On Mon, Nov 21, 2011 at 03:50:10PM +0200, Razya Ladelsky wrote: > > what do you mean by 'except for the affine stuff'? > > I mean that compute_affine_dependence must never be called on gather > data refs, that function can't do anything meaningful for them, they are > gather data refs exactly because dr_analyze_innermost failed on them > otherwise, as base and/or offset aren't simple IVs. >
I understand. I tried to follow the same paths that data refs (affine or not) go through in compute_all_depepndences. According to compute_all_depepndences(), the path for computing any data dependence is: call initialize_data_depepndence_relation(), and call compute_affine_dependence() if there's a loop nest. I tried to keep the same semantics for self dependences. Although compute_affine_dependence() can't do anything meaningful for the gather data refs, it may still be assigning values to the dependence relation structure, if you need to use them. Therefore I did not skip the call to compute_self_dependence(), which indeed calls compute_affine_depepndence(). If you think it's redundant, we can remove it. Thanks, Razya > > > So, when compute_all_dependences no longer calls it, neither should > > > vect_analyze_data_refs. > > > > So do you want to replace it with the call to compute_affine_dependence? > > No. With nothing at all. > > Jakub >