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] PR fortran/9972


	This patch is a proposed fix to the current Fortran testsuite
failure of 980520-1.f.  It was introduced by Honza's change to RTL
compilation deferal in early March.  The earlier patch tested
flag_inline_functions, but Fortran does not set that flag, so the compiler
was acting as if Tree inlining would be performed.

	This patch tests flag_inline_trees along with
flag_inline_functions to determine if Tree inlining may be enabled.  I
needed to move the definition of flag_inline_trees to toplev.c because
referencing it in other languages pulled in tree-inline.o, which created
undefined references to other cgraph object files not being linked for
those languages.

David


	* toplev.c: Include tree-inline.h.  Define flag_inline_trees.
	(rest_of_compilation): Use flag_inline_trees to defer RTL
	compilation as well.
	* tree-inline.c: Delete flag_inline_trees definition.

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.754
diff -c -p -r1.754 toplev.c
*** toplev.c	8 May 2003 00:16:31 -0000	1.754
--- toplev.c	13 May 2003 14:25:25 -0000
*************** Software Foundation, 59 Temple Place - S
*** 72,77 ****
--- 72,78 ----
  #include "debug.h"
  #include "target.h"
  #include "langhooks.h"
+ #include "tree-inline.h"
  #include "cfglayout.h"
  #include "cfgloop.h"
  #include "hosthooks.h"
*************** int flag_keep_inline_functions;
*** 691,696 ****
--- 692,704 ----
  
  int flag_no_inline = 2;
  
+ /* 0 if we should not perform inlining.
+    1 if we should expand functions calls inline at the tree level.
+    2 if we should consider *all* functions to be inline
+    candidates.  */
+ 
+ int flag_inline_trees = 0;
+ 
  /* Nonzero means that we don't want inlining by virtue of -fno-inline,
     not just because the tree inliner turned us off.  */
  
*************** rest_of_compilation (decl)
*** 2539,2545 ****
  
        if (inlinable
  	  || (DECL_INLINE (decl)
! 	      && flag_inline_functions
  	      && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
  		   && ! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
  		   && ! flag_keep_inline_functions)
--- 2547,2553 ----
  
        if (inlinable
  	  || (DECL_INLINE (decl)
! 	      && (flag_inline_functions || flag_inline_trees == 0)
  	      && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
  		   && ! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
  		   && ! flag_keep_inline_functions)
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.58
diff -c -p -r1.58 tree-inline.c
*** tree-inline.c	3 May 2003 13:28:33 -0000	1.58
--- tree-inline.c	13 May 2003 14:25:25 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 48,60 ****
  #include "java-tree.h"
  #endif /* INLINER_FOR_JAVA */
  
- /* 0 if we should not perform inlining.
-    1 if we should expand functions calls inline at the tree level.
-    2 if we should consider *all* functions to be inline
-    candidates.  */
- 
- int flag_inline_trees = 0;
- 
  /* To Do:
  
     o In order to make inlining-on-trees work, we pessimized
--- 48,53 ----


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