#include "tm.h"
#include "toplev.h"
#include "tree.h"
+#include "stringpool.h"
#include "expr.h"
#include "flags.h"
#include "params.h"
#include "input.h"
#include "hashtab.h"
#include "basic-block.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
+#include "gimple-ssa.h"
+#include "tree-cfg.h"
+#include "tree-ssanames.h"
+#include "tree-into-ssa.h"
+#include "tree-dfa.h"
#include "tree-ssa.h"
#include "tree-pass.h"
-#include "cgraph.h"
#include "function.h"
#include "ggc.h"
#include "diagnostic.h"
basic_block bb = alloc_block ();
bb->index = index;
SET_BASIC_BLOCK_FOR_FUNCTION (fn, index, bb);
- n_basic_blocks_for_function (fn)++;
+ n_basic_blocks_for_fn (fn)++;
return bb;
}
index = streamer_read_hwi (ib);
}
- p_bb = ENTRY_BLOCK_PTR_FOR_FUNCTION (fn);
+ p_bb = ENTRY_BLOCK_PTR_FOR_FN (fn);
index = streamer_read_hwi (ib);
while (index != -1)
{
loop->any_upper_bound = streamer_read_hwi (ib);
if (loop->any_upper_bound)
{
- loop->nb_iterations_upper_bound.low = streamer_read_uhwi (ib);
- loop->nb_iterations_upper_bound.high = streamer_read_hwi (ib);
+ HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
+ int i;
+ int prec ATTRIBUTE_UNUSED = streamer_read_uhwi (ib);
+ int len = streamer_read_uhwi (ib);
+ for (i = 0; i < len; i++)
+ a[i] = streamer_read_hwi (ib);
+
+ loop->nb_iterations_upper_bound = widest_int::from_array (a, len);
}
loop->any_estimate = streamer_read_hwi (ib);
if (loop->any_estimate)
{
- loop->nb_iterations_estimate.low = streamer_read_uhwi (ib);
- loop->nb_iterations_estimate.high = streamer_read_hwi (ib);
+ HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
+ int i;
+ int prec ATTRIBUTE_UNUSED = streamer_read_uhwi (ib);
+ int len = streamer_read_uhwi (ib);
+ for (i = 0; i < len; i++)
+ a[i] = streamer_read_hwi (ib);
+
+ loop->nb_iterations_estimate = widest_int::from_array (a, len);
}
place_new_loop (fn, loop);
fatal_error ("Cgraph edge statement index not found");
}
for (i = 0;
- ipa_ref_list_reference_iterate (&node->symbol.ref_list, i, ref);
+ ipa_ref_list_reference_iterate (&node->ref_list, i, ref);
i++)
if (ref->lto_stmt_uid)
{
while (orig->clone_of)
orig = orig->clone_of;
- fn = DECL_STRUCT_FUNCTION (orig->symbol.decl);
+ fn = DECL_STRUCT_FUNCTION (orig->decl);
fixup_call_stmt_edges_1 (orig, stmts, fn);
if (orig->clones)
gimple_register_cfg_hooks ();
- node = cgraph_get_create_node (fn_decl);
+ node = cgraph_get_node (fn_decl);
+ if (!node)
+ node = cgraph_create_node (fn_decl);
input_struct_function_base (fn, data_in, ib);
input_cfg (ib_cfg, fn, node->count_materialization_scale);
of a gimple body is used by the cgraph routines, but we should
really use the presence of the CFG. */
{
- edge_iterator ei = ei_start (ENTRY_BLOCK_PTR->succs);
+ edge_iterator ei = ei_start (ENTRY_BLOCK_PTR_FOR_FN (cfun)->succs);
gimple_set_body (fn_decl, bb_seq (ei_edge (ei)->dest));
}
int string_offset;
struct lto_input_block ib_cfg;
struct lto_input_block ib_main;
- tree fn_decl = node->symbol.decl;
+ tree fn_decl = node->decl;
header = (const struct lto_function_header *) data;
cfg_offset = sizeof (struct lto_function_header);
}
else if (tag == LTO_integer_cst)
{
- /* For shared integer constants in singletons we can use the existing
- tree integer constant merging code. */
+ /* For shared integer constants in singletons we can use the
+ existing tree integer constant merging code. */
tree type = stream_read_tree (ib, data_in);
- unsigned HOST_WIDE_INT low = streamer_read_uhwi (ib);
- HOST_WIDE_INT high = streamer_read_hwi (ib);
- result = build_int_cst_wide (type, low, high);
+ unsigned HOST_WIDE_INT len = streamer_read_uhwi (ib);
+ unsigned HOST_WIDE_INT i;
+ HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
+
+ for (i = 0; i < len; i++)
+ a[i] = streamer_read_hwi (ib);
+ result = wide_int_to_tree (type, wide_int::from_array
+ (a, len, TYPE_PRECISION (type)));
streamer_tree_cache_append (data_in->reader_cache, result, hash);
}
else if (tag == LTO_tree_scc)