diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-17 00:35:22 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-17 00:35:22 +0000 |
commit | cdc58a668b4cdcbdd4cc885abcb52bad2aedd8b9 (patch) | |
tree | 17fda233d4a5711e6252ed92e19a57d8be8e4c8c /gcc/lto-cgraph.c | |
parent | 37e18c14db9b11d1bcca0e2c116acd29d45915ef (diff) | |
download | gcc-cdc58a668b4cdcbdd4cc885abcb52bad2aedd8b9.tar.gz |
* lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when
processing clone.
* lto.c (lto_materialize_function): Do not tamper with STATIC and
EXTERNAL flags.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 5410e8fcbc5..08607f6e4cc 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -956,7 +956,16 @@ input_overwrite_node (struct lto_file_decl_data *file_data, node->lowered = bp_unpack_value (bp, 1); node->analyzed = tag == LTO_cgraph_analyzed_node; node->in_other_partition = bp_unpack_value (bp, 1); - if (node->in_other_partition) + if (node->in_other_partition + /* Avoid updating decl when we are seeing just inline clone. + When inlining function that has functions already inlined into it, + we produce clones of inline clones. + + WPA partitioning might put each clone into different unit and + we might end up streaming inline clone from other partition + to support clone we are interested in. */ + && (!node->clone_of + || node->clone_of->decl != node->decl)) { DECL_EXTERNAL (node->decl) = 1; TREE_STATIC (node->decl) = 0; |