/* Tree inlining hooks and declarations.
- Copyright (C) 2001-2014 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GCC.
#ifndef GCC_TREE_INLINE_H
#define GCC_TREE_INLINE_H
-#include "hash-map.h"
-#include "hash-set.h"
struct cgraph_edge;
CB_CGE_MOVE_CLONES
};
+typedef int_hash <unsigned short, 0> dependence_hash;
+
/* Data required for function body duplication. */
struct copy_body_data
tree retbnd;
/* Assign statements that need bounds copy. */
- vec<gimple> assign_stmts;
+ vec<gimple *> assign_stmts;
/* The map from local declarations in the inlined function to
equivalents in the function into which it is being inlined. */
/* GIMPLE_CALL if va arg parameter packs should be expanded or NULL
is not. */
- gimple gimple_call;
+ gimple *call_stmt;
/* Exception landing pad the inlined call lies in. */
int eh_lp_nr;
void (*transform_lang_insert_block) (tree);
/* Statements that might be possibly folded. */
- hash_set<gimple> *statements_to_fold;
+ hash_set<gimple *> *statements_to_fold;
/* Entry basic block to currently copied body. */
basic_block entry_bb;
bitmap blocks_to_copy;
/* Debug statements that need processing. */
- vec<gimple> debug_stmts;
+ vec<gdebug *> debug_stmts;
/* A map from local declarations in the inlined function to
equivalents in the function into which it is being inlined, where
/* Cilk keywords currently need to replace some variables that
ordinary nested functions do not. */
bool remap_var_for_cilk;
+
+ /* A map from the inlined functions dependence info cliques to
+ equivalents in the function into which it is being inlined. */
+ hash_map<dependence_hash, unsigned short> *dependence_map;
};
/* Weights of constructions for estimate_num_insns. */
-typedef struct eni_weights_d
+struct eni_weights
{
/* Cost per call. */
unsigned call_cost;
cost of a switch statement is logarithmic rather than linear in number
of cases. */
bool time_based;
-} eni_weights;
+};
/* Weights that estimate_num_insns uses for heuristics in inlining. */
tree copy_tree_r (tree *, int *, void *);
tree copy_decl_no_change (tree decl, copy_body_data *id);
int estimate_move_cost (tree type, bool);
-int estimate_num_insns (gimple, eni_weights *);
+int estimate_num_insns (gimple *, eni_weights *);
int estimate_num_insns_fn (tree, eni_weights *);
-int count_insns_seq (gimple_seq, eni_weights *);
+int estimate_num_insns_seq (gimple_seq, eni_weights *);
bool tree_versionable_function_p (tree);
extern tree remap_decl (tree decl, copy_body_data *id);
extern tree remap_type (tree type, copy_body_data *id);
extern gimple_seq copy_gimple_seq_and_replace_locals (gimple_seq seq);
extern bool debug_find_tree (tree, tree);
+extern tree copy_fn (tree, tree&, tree&);
+extern const char *copy_forbidden (struct function *fun, tree fndecl);
/* This is in tree-inline.c since the routine uses
data structures from the inliner. */