aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/cgraph.c
diff options
context:
space:
mode:
authorYiran Wang <yiran@google.com>2015-06-23 15:33:17 -0700
committerYiran Wang <yiran@google.com>2015-06-29 10:56:28 -0700
commit1d9fec7937f45dde5e04cac966a2d9a12f2fc15a (patch)
tree3fbcd18a379a05fd6d43491a107e1f36bc61b185 /gcc-4.9/gcc/cgraph.c
parentf378ebf14df0952eae870c9865bab8326aa8f137 (diff)
downloadtoolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.gz
toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.tar.bz2
toolchain_gcc-1d9fec7937f45dde5e04cac966a2d9a12f2fc15a.zip
Synchronize with google/gcc-4_9 to r224707 (from r214835)
Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d
Diffstat (limited to 'gcc-4.9/gcc/cgraph.c')
-rw-r--r--gcc-4.9/gcc/cgraph.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/cgraph.c b/gcc-4.9/gcc/cgraph.c
index 63b7b4d60..532d09b28 100644
--- a/gcc-4.9/gcc/cgraph.c
+++ b/gcc-4.9/gcc/cgraph.c
@@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-pretty-print.h"
#include "expr.h"
#include "tree-dfa.h"
+#include "opts.h"
/* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this. */
#include "tree-pass.h"
@@ -546,6 +547,7 @@ cgraph_create_node (tree decl)
node->next_nested = node->origin->nested;
node->origin->nested = node;
}
+ pattern_match_function_attributes (decl);
return node;
}
@@ -2462,6 +2464,11 @@ cgraph_can_remove_if_no_direct_calls_and_refs_p (struct cgraph_node *node)
/* Extern inlines can always go, we will use the external definition. */
if (DECL_EXTERNAL (node->decl))
return true;
+ /* Aux functions are safe to remove, but only once static promotion is
+ complete since they may affect promoted names if they are the context
+ for any static variables. */
+ if (cgraph_pre_profiling_inlining_done && cgraph_is_aux_decl_external (node))
+ return true;
/* When function is needed, we can not remove it. */
if (node->force_output || node->used_from_other_partition)
return false;