Re: [Open64-devel] Where can I find the simplifying codes?
Brought to you by:
ributzka,
suneeljain
From: David S. <dls...@sg...> - 2004-02-10 09:32:44
|
satan speed <sat...@ho...> wrote: > the Pro64's gfec generate WHIRL tree: > LOC 1 4 x &= -1; > I4I4LDID 0 <2,1,x> T<4,.predef_I4,4> > I4STID 0 <2,1,x> T<4,.predef_I4,4> > the WHIRL for "x &= -1" is not > I4I4LDID 0 <2,1,x> T<4,.predef_I4,4> > I4INTCONST -1 > I4BAND > I4STID 0 <2,1,x> T<4,.predef_I4,4> > > I think it must be simplified somewhere, but I can't find it. > Who will tell me? That would be the Simplifier. In particular, look for the procedure simp_band inside the file common/com/wn_simp_code.h. simp_band includes the rule "j & -1 --> j". The simplifier is invoked almost anytime that WHIRL code is constructed. In this case, gfec calls WN_Band, which is defined as a marco in common/com/wn.h: #define WN_Band(type,l,r) WN_Binary(OPR_BAND,type,l,r) WN_Binary invokes WN_CreateExp2 (see common/com/wn.cxx for both), which in turn invokes WN_SimplifyExp2, which invokes the Simplifier, and eventually simp_band. - David |