public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, 4.6] Do not create new cgraph noes in the verifier
@ 2011-03-11  9:43 Martin Jambor
  2011-03-11 10:24 ` Richard Guenther
  2011-03-11 14:21 ` Jan Hubicka
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Jambor @ 2011-03-11  9:43 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Guenther, Jan Hubicka

Hi,

while working on removing lazy cgraph node creation I have noticed
that we might do that even in the call graph verifier which certainly
looks undesirable.  Richi pre-approved removing it on IRC but I am not
sure whether that was for 4.6.  On the other hand I guess the change
is rather obvious and the verifier is disabled with release checking
and so I'd prefer to commit it now.  Is it OK?

Bootstrapped and tested on x86_63-linux without any problems.

Thanks,

Martin


2011-03-10  Martin Jambor  <mjambor@suse.cz>

	* cgraphunit.c (verify_cgraph_node): Call cgraph_get_node instead of
	cgraph_node.

Index: src/gcc/cgraphunit.c
===================================================================
--- src.orig/gcc/cgraphunit.c
+++ src/gcc/cgraphunit.c
@@ -551,7 +551,7 @@ verify_cgraph_node (struct cgraph_node *
       error_found = true;
     }
 
-  if (!cgraph_node (node->decl))
+  if (!cgraph_get_node (node->decl))
     {
       error ("node not found in cgraph_hash");
       error_found = true;

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

* Re: [PATCH, 4.6] Do not create new cgraph noes in the verifier
  2011-03-11  9:43 [PATCH, 4.6] Do not create new cgraph noes in the verifier Martin Jambor
@ 2011-03-11 10:24 ` Richard Guenther
  2011-03-11 14:21 ` Jan Hubicka
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Guenther @ 2011-03-11 10:24 UTC (permalink / raw)
  To: Martin Jambor; +Cc: GCC Patches, Jan Hubicka

On Fri, 11 Mar 2011, Martin Jambor wrote:

> Hi,
> 
> while working on removing lazy cgraph node creation I have noticed
> that we might do that even in the call graph verifier which certainly
> looks undesirable.  Richi pre-approved removing it on IRC but I am not
> sure whether that was for 4.6.  On the other hand I guess the change
> is rather obvious and the verifier is disabled with release checking
> and so I'd prefer to commit it now.  Is it OK?
> 
> Bootstrapped and tested on x86_63-linux without any problems.

Ok.

Thanks,
Richard.


> Thanks,
> 
> Martin
> 
> 
> 2011-03-10  Martin Jambor  <mjambor@suse.cz>
> 
> 	* cgraphunit.c (verify_cgraph_node): Call cgraph_get_node instead of
> 	cgraph_node.
> 
> Index: src/gcc/cgraphunit.c
> ===================================================================
> --- src.orig/gcc/cgraphunit.c
> +++ src/gcc/cgraphunit.c
> @@ -551,7 +551,7 @@ verify_cgraph_node (struct cgraph_node *
>        error_found = true;
>      }
>  
> -  if (!cgraph_node (node->decl))
> +  if (!cgraph_get_node (node->decl))
>      {
>        error ("node not found in cgraph_hash");
>        error_found = true;
> 
> 

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex

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

* Re: [PATCH, 4.6] Do not create new cgraph noes in the verifier
  2011-03-11  9:43 [PATCH, 4.6] Do not create new cgraph noes in the verifier Martin Jambor
  2011-03-11 10:24 ` Richard Guenther
@ 2011-03-11 14:21 ` Jan Hubicka
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Hubicka @ 2011-03-11 14:21 UTC (permalink / raw)
  To: GCC Patches, Richard Guenther, Jan Hubicka

> Hi,
> 
> while working on removing lazy cgraph node creation I have noticed
> that we might do that even in the call graph verifier which certainly
> looks undesirable.  Richi pre-approved removing it on IRC but I am not
> sure whether that was for 4.6.  On the other hand I guess the change
> is rather obvious and the verifier is disabled with release checking
> and so I'd prefer to commit it now.  Is it OK?

Yes it is OK.
Obviously that code never creates new nodes unless the cgraph hash is memory corrupted,
but it also never produce the error message.
Originaly the code was testing cgraph_get_node (node->decl) != node
and it was intended to check sanity of cgraph hash table at a time it was identifier
based and we was not pretending we have one definition rule.

Honza
> 
> Bootstrapped and tested on x86_63-linux without any problems.
> 
> Thanks,
> 
> Martin
> 
> 
> 2011-03-10  Martin Jambor  <mjambor@suse.cz>
> 
> 	* cgraphunit.c (verify_cgraph_node): Call cgraph_get_node instead of
> 	cgraph_node.
> 
> Index: src/gcc/cgraphunit.c
> ===================================================================
> --- src.orig/gcc/cgraphunit.c
> +++ src/gcc/cgraphunit.c
> @@ -551,7 +551,7 @@ verify_cgraph_node (struct cgraph_node *
>        error_found = true;
>      }
>  
> -  if (!cgraph_node (node->decl))
> +  if (!cgraph_get_node (node->decl))
>      {
>        error ("node not found in cgraph_hash");
>        error_found = true;

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

end of thread, other threads:[~2011-03-11 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-11  9:43 [PATCH, 4.6] Do not create new cgraph noes in the verifier Martin Jambor
2011-03-11 10:24 ` Richard Guenther
2011-03-11 14:21 ` Jan Hubicka

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).