cgraph.c (cgraph_get_body): Update call of lto_input_function_body.
* cgraph.c (cgraph_get_body): Update call of lto_input_function_body. * gimple-streamer-in.c (input_gimple_stmt): Move sanity check to ... * tree-cfg.c (verify_gimple_label): ... here. * ipa-utils.c: Include lto-streamer.h, ipa-inline.h (ipa_merge_profiles): New function. * lto-streamer-in.c (lto_read_body): Take node instead of fn_decl. (lto_input_function_body): Likewise. * ipa-utils.h (ipa_merge_profiles): Declare. * lto-streamer.h (lto_input_function_body): Update prototype. (emit_label_in_global_context_p): Remove. * lto-symtab.c: Include ipa-utils.h (lto_cgraph_replace_node): Use ipa_merge_profiles. From-SVN: r202131
This commit is contained in:
parent
4843f03206
commit
5e5812126c
@ -2,10 +2,16 @@
|
|||||||
|
|
||||||
* cgraph.c (cgraph_get_body): Update call of lto_input_function_body.
|
* cgraph.c (cgraph_get_body): Update call of lto_input_function_body.
|
||||||
* gimple-streamer-in.c (input_gimple_stmt): Move sanity check to ...
|
* gimple-streamer-in.c (input_gimple_stmt): Move sanity check to ...
|
||||||
|
* tree-cfg.c (verify_gimple_label): ... here.
|
||||||
* ipa-utils.c: Include lto-streamer.h, ipa-inline.h
|
* ipa-utils.c: Include lto-streamer.h, ipa-inline.h
|
||||||
(ipa_merge_profiles): New function.
|
(ipa_merge_profiles): New function.
|
||||||
* lto-streamer-in.c (lto_read_body): Take node instead of fn_decl.
|
* lto-streamer-in.c (lto_read_body): Take node instead of fn_decl.
|
||||||
(lto_input_function_body): Likewise.
|
(lto_input_function_body): Likewise.
|
||||||
|
* ipa-utils.h (ipa_merge_profiles): Declare.
|
||||||
|
* lto-streamer.h (lto_input_function_body): Update prototype.
|
||||||
|
(emit_label_in_global_context_p): Remove.
|
||||||
|
* lto-symtab.c: Include ipa-utils.h
|
||||||
|
(lto_cgraph_replace_node): Use ipa_merge_profiles.
|
||||||
|
|
||||||
2013-08-31 Jan Hubicka <jh@suse.cz>
|
2013-08-31 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ void ipa_free_postorder_info (void);
|
|||||||
vec<cgraph_node_ptr> ipa_get_nodes_in_cycle (struct cgraph_node *);
|
vec<cgraph_node_ptr> ipa_get_nodes_in_cycle (struct cgraph_node *);
|
||||||
int ipa_reverse_postorder (struct cgraph_node **);
|
int ipa_reverse_postorder (struct cgraph_node **);
|
||||||
tree get_base_var (tree);
|
tree get_base_var (tree);
|
||||||
|
void ipa_merge_profiles (struct cgraph_node *dst,
|
||||||
|
struct cgraph_node *src);
|
||||||
|
|
||||||
/* In ipa-devirt.c */
|
/* In ipa-devirt.c */
|
||||||
|
|
||||||
|
@ -834,7 +834,8 @@ extern void lto_streamer_hooks_init (void);
|
|||||||
/* In lto-streamer-in.c */
|
/* In lto-streamer-in.c */
|
||||||
extern void lto_input_cgraph (struct lto_file_decl_data *, const char *);
|
extern void lto_input_cgraph (struct lto_file_decl_data *, const char *);
|
||||||
extern void lto_reader_init (void);
|
extern void lto_reader_init (void);
|
||||||
extern void lto_input_function_body (struct lto_file_decl_data *, tree,
|
extern void lto_input_function_body (struct lto_file_decl_data *,
|
||||||
|
struct cgraph_node *,
|
||||||
const char *);
|
const char *);
|
||||||
extern void lto_input_constructors_and_inits (struct lto_file_decl_data *,
|
extern void lto_input_constructors_and_inits (struct lto_file_decl_data *,
|
||||||
const char *);
|
const char *);
|
||||||
@ -1030,14 +1031,6 @@ lto_tree_ref_encoder_get_tree (struct lto_tree_ref_encoder *encoder,
|
|||||||
return encoder->trees[idx];
|
return encoder->trees[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return true if LABEL should be emitted in the global context. */
|
|
||||||
static inline bool
|
|
||||||
emit_label_in_global_context_p (tree label)
|
|
||||||
{
|
|
||||||
return DECL_NONLOCAL (label) || FORCED_LABEL (label);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return number of encoded nodes in ENCODER. */
|
/* Return number of encoded nodes in ENCODER. */
|
||||||
static inline int
|
static inline int
|
||||||
lto_symtab_encoder_size (lto_symtab_encoder_t encoder)
|
lto_symtab_encoder_size (lto_symtab_encoder_t encoder)
|
||||||
|
@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
|
|||||||
#include "hashtab.h"
|
#include "hashtab.h"
|
||||||
#include "plugin-api.h"
|
#include "plugin-api.h"
|
||||||
#include "lto-streamer.h"
|
#include "lto-streamer.h"
|
||||||
|
#include "ipa-utils.h"
|
||||||
|
|
||||||
/* Vector to keep track of external variables we've seen so far. */
|
/* Vector to keep track of external variables we've seen so far. */
|
||||||
vec<tree, va_gc> *lto_global_var_decls;
|
vec<tree, va_gc> *lto_global_var_decls;
|
||||||
@ -80,6 +81,7 @@ lto_cgraph_replace_node (struct cgraph_node *node,
|
|||||||
/* Redirect incomming references. */
|
/* Redirect incomming references. */
|
||||||
ipa_clone_referring ((symtab_node)prevailing_node, &node->symbol.ref_list);
|
ipa_clone_referring ((symtab_node)prevailing_node, &node->symbol.ref_list);
|
||||||
|
|
||||||
|
ipa_merge_profiles (prevailing_node, node);
|
||||||
lto_free_function_in_decl_state_for_node ((symtab_node)node);
|
lto_free_function_in_decl_state_for_node ((symtab_node)node);
|
||||||
|
|
||||||
if (node->symbol.decl != prevailing_node->symbol.decl)
|
if (node->symbol.decl != prevailing_node->symbol.decl)
|
||||||
|
@ -4252,6 +4252,12 @@ verify_gimple_label (gimple stmt)
|
|||||||
|
|
||||||
if (TREE_CODE (decl) != LABEL_DECL)
|
if (TREE_CODE (decl) != LABEL_DECL)
|
||||||
return true;
|
return true;
|
||||||
|
if (!DECL_NONLOCAL (decl) && !FORCED_LABEL (decl)
|
||||||
|
&& DECL_CONTEXT (decl) != current_function_decl)
|
||||||
|
{
|
||||||
|
error ("label's context is not the current function decl");
|
||||||
|
err |= true;
|
||||||
|
}
|
||||||
|
|
||||||
uid = LABEL_DECL_UID (decl);
|
uid = LABEL_DECL_UID (decl);
|
||||||
if (cfun->cfg
|
if (cfun->cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user