This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C] Fix GNU extern inline heuristic again (fix C++ memory usage regression)
- From: Ian Lance Taylor <iant at google dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 27 Aug 2007 11:14:58 -0700
- Subject: Re: [PATCH][C] Fix GNU extern inline heuristic again (fix C++ memory usage regression)
- References: <Pine.LNX.4.64.0708271509250.4343@s68.fhfr.qr>
Richard Guenther <rguenther@suse.de> writes:
> + /* For GNU C extern inline functions disregard inline limits. */
> + if (DECL_EXTERNAL (fndecl)
> + && DECL_DECLARED_INLINE_P (fndecl))
> + DECL_DISREGARD_INLINE_LIMITS (fndecl) = 1;
You may have found a bug here. I see that you are just replicating
the existing code. But a GNU C extern inline function is not the same
as a C99 extern inline function. I don't see any obvious reason why
we should disregard inline limits for a C99 extern inline function.
*************** handle_always_inline_attribute (tree *no
*** 4864,4871 ****
{
if (TREE_CODE (*node) == FUNCTION_DECL)
{
! /* Do nothing else, just set the attribute. We'll get at
! it later with lookup_attribute. */
}
else
{
--- 4864,4872 ----
{
if (TREE_CODE (*node) == FUNCTION_DECL)
{
! /* Set the attribute and mark it for disregarding inline
! limits. */
! DECL_DISREGARD_INLINE_LIMITS (*node) = 1;
}
else
{
Is there any reason to keep the attribute, if we are setting the flag?
That is, why not set *no_add_attrs = true?
Ian