please go ahead Sun On Mon, Jun 20, 2011 at 2:40 PM, Wu Yongchong <wuyongch...@gmail.com> wrote: > Hi, Sun > I have made a change, allocate stack space when Debug_level > 0 > > Index: osprey/be/com/data_layout.cxx > =================================================================== > --- osprey/be/com/data_layout.cxx (revision 3653) > +++ osprey/be/com/data_layout.cxx (working copy) > @@ -2588,6 +2588,14 @@ > Set_Error_Phase("Data Layout"); > Clear_Vararg_Symbols(); > > + if (Debug_Level > 0) { > + FOREACH_SYMBOL (CURRENT_SYMTAB, st, i) { > + if (ST_class(st) == CLASS_VAR) { > + Allocate_Object(st); > + } > + } > + } > + > For_all (Inito_Table, CURRENT_SYMTAB, finalize_inito()); > > /* if nested pu, then may not see reference in this pu, > @@ -3370,7 +3378,7 @@ > return; > } > > - if (ST_is_not_used(st)) return; > + if (ST_is_not_used(st)&& Debug_Level <= 0) return; > > if (ST_has_named_section(st)) { > // bug fix for OSP_138 > > > On Mon, Jun 20, 2011 at 2:13 PM, Wu Yongchong <wuyongch...@gmail.com> wrote: >> You are right, I should check the debug level, not the performance level. >> >> On Mon, Jun 20, 2011 at 2:10 PM, Sun Chan <sun.c...@gmail.com> wrote: >>> if it is for debuggability, shouldn't you use the -g3 option instead of -O0? >>> Sun >>> >>> On Mon, Jun 20, 2011 at 1:55 PM, Wu Yongchong <wuyongch...@gmail.com> wrote: >>>> Hi, >>>> can a gatekeeper help review this patch, >>>> This patch will allocate stack space for unused variable in -O0. It's >>>> useful for debug-ability in -O0. >>>> >>>> Index: osprey/be/com/data_layout.cxx >>>> =================================================================== >>>> --- osprey/be/com/data_layout.cxx (revision 3650) >>>> +++ osprey/be/com/data_layout.cxx (working copy) >>>> @@ -2588,6 +2588,14 @@ >>>> Set_Error_Phase("Data Layout"); >>>> Clear_Vararg_Symbols(); >>>> >>>> + if (Opt_Level < 1) { >>>> + FOREACH_SYMBOL (CURRENT_SYMTAB, st, i) { >>>> + if (ST_class(st) == CLASS_VAR) { >>>> + Allocate_Object(st); >>>> + } >>>> + } >>>> + } >>>> + >>>> For_all (Inito_Table, CURRENT_SYMTAB, finalize_inito()); >>>> >>>> /* if nested pu, then may not see reference in this pu, >>>> @@ -3370,7 +3378,7 @@ >>>> return; >>>> } >>>> >>>> - if (ST_is_not_used(st)) return; >>>> + if (ST_is_not_used(st)&& Opt_Level >= 1) return; >>>> >>>> if (ST_has_named_section(st)) { >>>> // bug fix for OSP_138 >>>> >>>> >>>> >>>> -- >>>> yongchong >>>> >>>> ------------------------------------------------------------------------------ >>>> EditLive Enterprise is the world's most technically advanced content >>>> authoring tool. Experience the power of Track Changes, Inline Image >>>> Editing and ensure content is compliant with Accessibility Checking. >>>> http://p.sf.net/sfu/ephox-dev2dev >>>> _______________________________________________ >>>> Open64-devel mailing list >>>> Open64-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/open64-devel >>>> >>> >> >> >> >> -- >> yongchong >> > > > > -- > yongchong >
------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel