This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.1 bug: flag_no_inline incorrectly set


On Sun, Apr 28, 2002 at 04:59:33PM -0700, Mark Mitchell wrote:
> 
> That makes more sense -- but I still don't get it.  flag_inline_trees
> is set to 1, right above that point; shouldn't it be set to 1 only
> in the not-instrumenting-entry-and-exit case?

Maybe Neil, who wrote the original code, should fight this out with
those who later broke it.  :-)

> Furthermore, isn't the flag_no_inline stuff independent of
> flag_instrument_function_entry_exit?

It ought to be.  I didn't want to raise that issue, partly because I
can't remember exactly why we don't want the two together.

> Why not something like this:
> 
>  /* Normally, we want to inline using the tree inliner -- but
>     instrumentation of function entry and exit is not supported
>     when using the tree inliner, so we cannot use the tree inliner
>     in that case.  */
>  flag_inline_trees = !flag_instrument_function_entry_exit;
> 
>  if (!flag_no_inline)
>    flag_no_inline = 1;

No, not this, please!  Either leave flag_no_inline alone, or only set
it if flag_instrument_function_entry_exit.

>  /* If we're supposed to inline everything, and we're using the tree
>     inliner, set flag_inline_trees to 2 to indicate that, and turn off
>     flag_inline_functions so that the RTL inliner doesn't try to inline
>     things as well.  */
>  if (flag_inline_functions && flag_inline_trees)
>    {
>      flag_inline_trees = 2;
>      flag_inline_functions = 0;
>    }

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]