diff options
author | Jan Hubicka <jh@suse.cz> | 2010-09-17 02:35:22 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-09-17 00:35:22 +0000 |
commit | 52b3b3c7e24d8ef6de75310eb4a1437f45c1f469 (patch) | |
tree | 17fda233d4a5711e6252ed92e19a57d8be8e4c8c /gcc | |
parent | ff01e2cb4486f4bff6ae371a0bf9a80c3370c4d3 (diff) | |
download | gcc-52b3b3c7e24d8ef6de75310eb4a1437f45c1f469.zip gcc-52b3b3c7e24d8ef6de75310eb4a1437f45c1f469.tar.gz gcc-52b3b3c7e24d8ef6de75310eb4a1437f45c1f469.tar.bz2 |
lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when processing clone.
* 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.
From-SVN: r164354
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto-cgraph.c | 11 | ||||
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 5 |
4 files changed, 20 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 825abbf..7625ff3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-09-16 Jan Hubicka <jh@suse.cz> + + * lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when + processing clone. + 2010-09-16 H.J. Lu <hongjiu.lu@intel.com> * config/i386/i386-protos.h (ix86_split_idivmod): New prototype. diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 5410e8f..08607f6 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; diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 5e4955b..a8f7bc1 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2010-09-16 Jan Hubicka <jh@suse.cz> + + * lto.c (lto_materialize_function): Do not tamper with STATIC and + EXTERNAL flags. + 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com> * lto-tree.h (struct lang_type): Add variable_size GTY option. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 7478213..88a3b97 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -160,9 +160,6 @@ lto_materialize_function (struct cgraph_node *node) and also functions that are needed to produce virtual clones. */ if (node->analyzed || has_analyzed_clone_p (node)) { - /* This function has a definition. */ - TREE_STATIC (decl) = 1; - /* Clones don't need to be read. */ if (node->clone_of) return; @@ -198,8 +195,6 @@ lto_materialize_function (struct cgraph_node *node) if (!flag_wpa) ggc_collect (); } - else - DECL_EXTERNAL (decl) = 1; /* Let the middle end know about the function. */ rest_of_decl_compilation (decl, 1, 0); |