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]

Audit cgraphunit for optimization attributes


Hi,
this patch updates cgraphunit.  One non-trivial case is expand_thunk.  Jason, I
think expand_thunk should always inherit optimization/target attributes from
the function it is associated with, right?

Bootstrapped/regtested x86_64-linux.

Honza

	* cgraphunit.c (analyze_functions): Use opt_for_fn.

Index: cgraphunit.c
===================================================================
--- cgraphunit.c	(revision 217633)
+++ cgraphunit.c	(working copy)
@@ -1001,7 +1001,7 @@ analyze_functions (void)
 	      for (edge = cnode->callees; edge; edge = edge->next_callee)
 		if (edge->callee->definition)
 		   enqueue_node (edge->callee);
-	      if (optimize && flag_devirtualize)
+	      if (optimize && opt_for_fn (cnode->decl, flag_devirtualize))
 		{
 		  cgraph_edge *next;
 


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