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]

[PATCH] Remove unused inline_decl member


This removes inline_decl from struct cgraph_node as it is only
ever read and never written to.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to
trunk.

Richard.

2009-05-21  Richard Guenther  <rguenther@suse.de>

	* cgraph.h (struct cgraph_node): Remove inline_decl member.
	* ipa-inline.c (cgraph_mark_inline_edge): Do not check it.
	(cgraph_default_inline_p): Likewise.
	(cgraph_decide_inlining_incrementally): Likewise.

Index: gcc/cgraph.h
===================================================================
*** gcc/cgraph.h	(revision 147735)
--- gcc/cgraph.h	(working copy)
*************** struct GTY((chain_next ("%h.next"), chai
*** 213,223 ****
    unsigned alias : 1;
    /* Set for nodes that was constructed and finalized by frontend.  */
    unsigned finalized_by_frontend : 1;
- 
-   /* In non-unit-at-a-time mode the function body of inline candidates is saved
-      into clone before compiling so the function in original form can be
-      inlined later.  This pointer points to the clone.  */
-   tree inline_decl;
  };
  
  typedef struct cgraph_node *cgraph_node_ptr;
--- 213,218 ----
Index: gcc/ipa-inline.c
===================================================================
*** gcc/ipa-inline.c	(revision 147735)
--- gcc/ipa-inline.c	(working copy)
*************** cgraph_mark_inline_edge (struct cgraph_e
*** 258,266 ****
    struct cgraph_node *to = NULL, *what;
    struct cgraph_edge *curr = e;
  
-   if (e->callee->inline_decl)
-     cgraph_redirect_edge_callee (e, cgraph_node (e->callee->inline_decl));
- 
    gcc_assert (e->inline_failed);
    e->inline_failed = CIF_OK;
  
--- 258,263 ----
*************** cgraph_default_inline_p (struct cgraph_n
*** 425,432 ****
  {
    tree decl = n->decl;
  
-   if (n->inline_decl)
-     decl = n->inline_decl;
    if (!flag_inline_small_functions && !DECL_DECLARED_INLINE_P (decl))
      {
        if (reason)
--- 422,427 ----
*************** cgraph_decide_inlining_incrementally (st
*** 1417,1423 ****
  	      }
  	    continue;
  	  }
! 	if (!e->callee->analyzed && !e->callee->inline_decl)
  	  {
  	    if (dump_file)
  	      {
--- 1412,1418 ----
  	      }
  	    continue;
  	  }
! 	if (!e->callee->analyzed)
  	  {
  	    if (dump_file)
  	      {
*************** cgraph_decide_inlining_incrementally (st
*** 1493,1499 ****
  	      }
  	    continue;
  	  }
! 	if (!e->callee->analyzed && !e->callee->inline_decl)
  	  {
  	    if (dump_file)
  	      {
--- 1488,1494 ----
  	      }
  	    continue;
  	  }
! 	if (!e->callee->analyzed)
  	  {
  	    if (dump_file)
  	      {


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