public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [c++] Remove redundant inline check
@ 2011-04-18 18:52 Jan Hubicka
  2011-04-18 19:52 ` Mark Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Hubicka @ 2011-04-18 18:52 UTC (permalink / raw)
  To: gcc-patches, mark

Hi,
the test whether function contains computed goto is re-done by tree-inline (and re-done
after optimization, so it is bit more sensitive).  There is also nothing language specific
in this.

Bootstrapped/regtested x86_64-linux, OK?

	* cp/semantics.c (finish_goto_stmt): Do set UNINLINABLE flag on computed
	gotos.

Index: cp/semantics.c
===================================================================
--- cp/semantics.c	(revision 172657)
+++ cp/semantics.c	(working copy)
@@ -569,11 +569,6 @@ finish_goto_stmt (tree destination)
 	  if (error_operand_p (destination))
 	    return NULL_TREE;
 	}
-      /* We don't inline calls to functions with computed gotos.
-	 Those functions are typically up to some funny business,
-	 and may be depending on the labels being at particular
-	 addresses, or some such.  */
-      DECL_UNINLINABLE (current_function_decl) = 1;
     }
 
   check_goto (destination);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [c++] Remove redundant inline check
  2011-04-18 18:52 [c++] Remove redundant inline check Jan Hubicka
@ 2011-04-18 19:52 ` Mark Mitchell
  2011-04-18 21:28   ` Richard Guenther
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Mitchell @ 2011-04-18 19:52 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: gcc-patches

On 4/18/2011 11:47 AM, Jan Hubicka wrote:

> Bootstrapped/regtested x86_64-linux, OK?
> 
> 	* cp/semantics.c (finish_goto_stmt): Do set UNINLINABLE flag on computed
> 	gotos.

Provided that we have this check elsewhere in the compiler and are
therefore confident we won't accidentally inline such things, this is fine.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [c++] Remove redundant inline check
  2011-04-18 19:52 ` Mark Mitchell
@ 2011-04-18 21:28   ` Richard Guenther
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Guenther @ 2011-04-18 21:28 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: Jan Hubicka, gcc-patches

On Mon, Apr 18, 2011 at 9:02 PM, Mark Mitchell <mark@codesourcery.com> wrote:
> On 4/18/2011 11:47 AM, Jan Hubicka wrote:
>
>> Bootstrapped/regtested x86_64-linux, OK?
>>
>>       * cp/semantics.c (finish_goto_stmt): Do set UNINLINABLE flag on computed
>>       gotos.
>
> Provided that we have this check elsewhere in the compiler and are
> therefore confident we won't accidentally inline such things, this is fine.

Though the description in the changelog sounds backwards (missing a 'not'?)

Richard.

> --
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-18 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 18:52 [c++] Remove redundant inline check Jan Hubicka
2011-04-18 19:52 ` Mark Mitchell
2011-04-18 21:28   ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).