Re: [Open64-devel] loopnest in inliner
Brought to you by:
ributzka,
suneeljain
From: Gautam C. <gau...@ya...> - 2010-07-22 08:53:41
|
Thanks, I thought you were using -ipa and I thought you were referring to the IPA summary phase in IPL. For the lightweight inliner, you are right. In case anyone is interested, if you were using the GNU3-based front-end, then you will still see WHILE_DO in lw_inline. Gautam ________________________________ From: Gang Yu <yug...@gm...> To: Gautam Chakrabarti <gau...@ya...> Cc: ope...@li... Sent: Wed, July 21, 2010 11:45:32 PM Subject: Re: [Open64-devel] loopnest in inliner Gautam: I just use lw_inline(_LIGHTWEIGHT_INLINER), compiling using $TOOLROOT/bin/opencc -show -keep -c -INLINE:preempt foo.c opencc is v4.2.3 thanks Gang On Thu, Jul 22, 2010 at 2:07 PM, Gautam Chakrabarti <gau...@ya...> wrote: Hi, > >I am not sure why you are seeing no DO_LOOP/WHILE_DO. Generation of WHILE_DO >does not depend on WOPT, so even if you compile with -O0 -ipa, you should still >see WHILE_DO. If you compile with just -ipa (which invokes the preoptimizer >before IPA), you should see DO_LOOP in the code. > >What options are you using, and what compiler version? > >Gautam > > > > ________________________________ From: Gang Yu <yug...@gm...> >To: ope...@li... >Sent: Wed, July 21, 2010 6:29:53 PM >Subject: [Open64-devel] loopnest in inliner > > >Hi, all: > > I am just get in trouble in ipa inliner. As you know, there is a variable >*loopnest* in Summary_Callsite which indicates the loopnest of the callsite. >loopnest is obtained on up-traversel the whirl tree(ipl_summary_template.h). >However, since the IPA is before wopt phase, the whirl could not generate any >OPR_DO_LOOP,OPR_WHILE_DO, so, anytime I get loopnest always be 0. Does anyone >previously meet the problem? Thanks for your correction and advice. > > Thanks for your attentions! > >Below is a test case: > >int x; >int y=5; > >static int foo(int x){ > int i; > int sum; > for(i=x;i<x+2;i++){ > sum+=i; > } > return sum; >} > > > >int main(int argc, char* argv[]){ > int j; > int i; > if (y>=1){ > x=5; > for(i=0;i<10;i++) > for(j=0;j<2;j++){ > x=foo(x); > } > } >} > >Gang > > |