diff mbox

Audit cgraphunit for optimization attributes

Message ID 20141116205446.GE13765@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Nov. 16, 2014, 8:54 p.m. UTC
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.
diff mbox

Patch

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;