This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Audit cgraphunit for optimization attributes
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Sun, 16 Nov 2014 21:54:46 +0100
- Subject: Audit cgraphunit for optimization attributes
- Authentication-results: sourceware.org; auth=none
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;