targetm.emutls.tmpl_section);
}
- varpool_finalize_decl (to);
+ /* Create varpool node for the new variable and finalize it if it is
+ not external one. */
+ if (DECL_EXTERNAL (to))
+ varpool_node (to);
+ else
+ varpool_finalize_decl (to);
return build_fold_addr_expr (to);
}
record_references_in_initializer (to, false);
}
- varpool_finalize_decl (to);
+ /* Create varpool node for the new variable and finalize it if it is
+ not external one. */
+ if (DECL_EXTERNAL (to))
+ varpool_node (to);
+ else
+ varpool_finalize_decl (to);
return to;
}
gimple_seq_add_stmt (&d->seq, x);
cgraph_create_edge (d->cfun_node, d->builtin_node, x,
- d->bb->count, d->bb_freq, d->bb->loop_depth);
+ d->bb->count, d->bb_freq);
/* We may be adding a new reference to a new variable to the function.
This means we have to play with the ipa-reference web. */
d.cfun_node = node;
d.builtin_decl = built_in_decls[BUILT_IN_EMUTLS_GET_ADDRESS];
- d.builtin_node = cgraph_node (d.builtin_decl);
+ /* This is where we introduce the declaration to the IL and so we have to
+ create a node for it. */
+ d.builtin_node = cgraph_get_create_node (d.builtin_decl);
FOR_EACH_BB (d.bb)
{
VEC_free (varpool_node_ptr, heap, control_vars);
VEC_free (tree, heap, access_vars);
- tls_vars = NULL;
+ free_varpool_node_set (tls_vars);
return TODO_dump_func | TODO_ggc_collect | TODO_verify_all;
}
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- TV_NONE, /* tv_id */
+ TV_IPA_OPT, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */