It doesn't fail on my target, which is based on 4.5 and has backported this patch. I will have a look at PowerPC.
Bingfeng > -----Original Message----- > From: Revital1 Eres [mailto:e...@il.ibm.com] > Sent: 15 September 2010 13:51 > To: Bingfeng Mei > Subject: RE: Question about alias check in ddg.c > > Hi, > > Thanks for the answer. But this means that this is a regression > compared to > previous version, right? Do you know if there is an intention to fix it? > > Thanks, > Revital > > > > From: "Bingfeng Mei" <b...@broadcom.com> > To: Revital1 Eres/Haifa/i...@ibmil, "gcc@gcc.gnu.org" > <gcc@gcc.gnu.org> > Date: 15/09/2010 02:39 PM > Subject: RE: Question about alias check in ddg.c > Sent by: gcc-ow...@gcc.gnu.org > > > > The old insns_may_alias_p is based checking alias set number. But since > 4.5, the new alias oracle doesn't rely the alias set number. > may_alias_p() > is a new function based on alias oracle. Essentially, it is same as > true_dependence function but excluding offset and TBAA based > disambiguation, > which is not valid for cross-iteration memory dependence analysis. > > Cheers, > Bingfeng > > > -----Original Message----- > > From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf > Of > > Revital1 Eres > > Sent: 15 September 2010 13:28 > > To: gcc@gcc.gnu.org > > Subject: Question about alias check in ddg.c > > > > > > Hello, > > > > When trying to compile the following loop with GCC -r164298 with > modulo > > scheduling pass enabled on PowerPC I get that the inter loop edges > > between the memory instructions are created in the DDG although the > > following check in ddg.c exists: > > > > static void > > add_inter_loop_mem_dep (ddg_ptr g, ddg_node_ptr from, ddg_node_ptr to) > > { > > if (!insns_may_alias_p (from->insn, to->insn)) > > return; > > > > With GCC -r146278 the edges are not created in the DDG. > > Looking more closely into the code I see the following differences in > > ddg.c > > between the GCC versions: > > > > The new version of GCC contains: > > > > add_inter_loop_mem_dep () -> ...-> may_alias_p() > > > > while with GCC -r146278: > > > > add_inter_loop_mem_dep () -> ... -> insn_alias_sets_conflict_p() > > > > I do not understand this behavior and I appreciate an explanation. > > > > Thanks, > > Revital > > > > > > void foo( int * __restrict__ dst, int * __restrict__ src1, > > int * __restrict__ src2) > > { > > int x, y; > > > > for( x = 0; x < 100; x+=1 ) > > { > > dst[x] = ( src1[x] * src2[x] ) ; > > } > > } > > > > > >