Commit 413581ba by Richard Guenther Committed by Richard Biener

tree-nested.c (get_trampoline_type): Use size_int.

2011-04-29  Richard Guenther  <rguenther@suse.de>

	* tree-nested.c (get_trampoline_type): Use size_int.
	(get_nl_goto_field): Likewise.
	* tree-eh.c (lower_try_finally_switch): Use integer_type_node
	for all indexes.
	(lower_eh_constructs_2): Likewise.
	(lower_resx): Likewise.
	(lower_eh_dispatch): Likewise.
	* tree-mudflap.c (mf_build_string): Use size_int.
	(mudflap_register_call): Use integer_type_node for the flag.
	(mudflap_enqueue_constant): Use size_int.
	* tree-chrec.c (reset_evolution_in_loop): Copy CHREC_VAR
	instead of rebuilding it.

From-SVN: r173153
parent 5c04e9f4
2011-04-29 Richard Guenther <rguenther@suse.de> 2011-04-29 Richard Guenther <rguenther@suse.de>
* tree-nested.c (get_trampoline_type): Use size_int.
(get_nl_goto_field): Likewise.
* tree-eh.c (lower_try_finally_switch): Use integer_type_node
for all indexes.
(lower_eh_constructs_2): Likewise.
(lower_resx): Likewise.
(lower_eh_dispatch): Likewise.
* tree-mudflap.c (mf_build_string): Use size_int.
(mudflap_register_call): Use integer_type_node for the flag.
(mudflap_enqueue_constant): Use size_int.
* tree-chrec.c (reset_evolution_in_loop): Copy CHREC_VAR
instead of rebuilding it.
2011-04-29 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (get_fi_for_callee): Restructure. * tree-ssa-structalias.c (get_fi_for_callee): Restructure.
Handle OBJ_TYPE_REF. Handle OBJ_TYPE_REF.
(find_func_aliases_for_call): Use it more consistently. (find_func_aliases_for_call): Use it more consistently.
......
...@@ -843,8 +843,7 @@ reset_evolution_in_loop (unsigned loop_num, ...@@ -843,8 +843,7 @@ reset_evolution_in_loop (unsigned loop_num,
tree right = reset_evolution_in_loop (loop_num, CHREC_RIGHT (chrec), tree right = reset_evolution_in_loop (loop_num, CHREC_RIGHT (chrec),
new_evol); new_evol);
return build3 (POLYNOMIAL_CHREC, TREE_TYPE (left), return build3 (POLYNOMIAL_CHREC, TREE_TYPE (left),
build_int_cst (NULL_TREE, CHREC_VARIABLE (chrec)), CHREC_VAR (chrec), left, right);
left, right);
} }
while (TREE_CODE (chrec) == POLYNOMIAL_CHREC while (TREE_CODE (chrec) == POLYNOMIAL_CHREC
......
...@@ -1336,11 +1336,12 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf) ...@@ -1336,11 +1336,12 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
if (tf->may_fallthru) if (tf->may_fallthru)
{ {
x = gimple_build_assign (finally_tmp, x = gimple_build_assign (finally_tmp,
build_int_cst (NULL, fallthru_index)); build_int_cst (integer_type_node,
fallthru_index));
gimple_seq_add_stmt (&tf->top_p_seq, x); gimple_seq_add_stmt (&tf->top_p_seq, x);
last_case = build3 (CASE_LABEL_EXPR, void_type_node, last_case = build3 (CASE_LABEL_EXPR, void_type_node,
build_int_cst (NULL, fallthru_index), build_int_cst (integer_type_node, fallthru_index),
NULL, create_artificial_label (tf_loc)); NULL, create_artificial_label (tf_loc));
VEC_quick_push (tree, case_label_vec, last_case); VEC_quick_push (tree, case_label_vec, last_case);
last_case_index++; last_case_index++;
...@@ -1358,14 +1359,14 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf) ...@@ -1358,14 +1359,14 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
emit_post_landing_pad (&eh_seq, tf->region); emit_post_landing_pad (&eh_seq, tf->region);
x = gimple_build_assign (finally_tmp, x = gimple_build_assign (finally_tmp,
build_int_cst (NULL, eh_index)); build_int_cst (integer_type_node, eh_index));
gimple_seq_add_stmt (&eh_seq, x); gimple_seq_add_stmt (&eh_seq, x);
x = gimple_build_goto (finally_label); x = gimple_build_goto (finally_label);
gimple_seq_add_stmt (&eh_seq, x); gimple_seq_add_stmt (&eh_seq, x);
last_case = build3 (CASE_LABEL_EXPR, void_type_node, last_case = build3 (CASE_LABEL_EXPR, void_type_node,
build_int_cst (NULL, eh_index), build_int_cst (integer_type_node, eh_index),
NULL, create_artificial_label (tf_loc)); NULL, create_artificial_label (tf_loc));
VEC_quick_push (tree, case_label_vec, last_case); VEC_quick_push (tree, case_label_vec, last_case);
last_case_index++; last_case_index++;
...@@ -1397,7 +1398,8 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf) ...@@ -1397,7 +1398,8 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
if (q->index < 0) if (q->index < 0)
{ {
x = gimple_build_assign (finally_tmp, x = gimple_build_assign (finally_tmp,
build_int_cst (NULL, return_index)); build_int_cst (integer_type_node,
return_index));
gimple_seq_add_stmt (&mod, x); gimple_seq_add_stmt (&mod, x);
do_return_redirection (q, finally_label, mod, &return_val); do_return_redirection (q, finally_label, mod, &return_val);
switch_id = return_index; switch_id = return_index;
...@@ -1405,7 +1407,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf) ...@@ -1405,7 +1407,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
else else
{ {
x = gimple_build_assign (finally_tmp, x = gimple_build_assign (finally_tmp,
build_int_cst (NULL, q->index)); build_int_cst (integer_type_node, q->index));
gimple_seq_add_stmt (&mod, x); gimple_seq_add_stmt (&mod, x);
do_goto_redirection (q, finally_label, mod, tf); do_goto_redirection (q, finally_label, mod, tf);
switch_id = q->index; switch_id = q->index;
...@@ -1418,7 +1420,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf) ...@@ -1418,7 +1420,7 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
tree case_lab; tree case_lab;
void **slot; void **slot;
case_lab = build3 (CASE_LABEL_EXPR, void_type_node, case_lab = build3 (CASE_LABEL_EXPR, void_type_node,
build_int_cst (NULL, switch_id), build_int_cst (integer_type_node, switch_id),
NULL, create_artificial_label (tf_loc)); NULL, create_artificial_label (tf_loc));
/* We store the cont_stmt in the pointer map, so that we can recover /* We store the cont_stmt in the pointer map, so that we can recover
it in the loop below. */ it in the loop below. */
...@@ -1863,7 +1865,8 @@ lower_eh_constructs_2 (struct leh_state *state, gimple_stmt_iterator *gsi) ...@@ -1863,7 +1865,8 @@ lower_eh_constructs_2 (struct leh_state *state, gimple_stmt_iterator *gsi)
this zero argument with the current catch region number. */ this zero argument with the current catch region number. */
if (state->ehp_region) if (state->ehp_region)
{ {
tree nr = build_int_cst (NULL, state->ehp_region->index); tree nr = build_int_cst (integer_type_node,
state->ehp_region->index);
gimple_call_set_arg (stmt, 0, nr); gimple_call_set_arg (stmt, 0, nr);
} }
else else
...@@ -2952,10 +2955,10 @@ lower_resx (basic_block bb, gimple stmt, struct pointer_map_t *mnt_map) ...@@ -2952,10 +2955,10 @@ lower_resx (basic_block bb, gimple stmt, struct pointer_map_t *mnt_map)
else else
{ {
edge_iterator ei; edge_iterator ei;
tree dst_nr = build_int_cst (NULL, dst_r->index); tree dst_nr = build_int_cst (integer_type_node, dst_r->index);
fn = implicit_built_in_decls[BUILT_IN_EH_COPY_VALUES]; fn = implicit_built_in_decls[BUILT_IN_EH_COPY_VALUES];
src_nr = build_int_cst (NULL, src_r->index); src_nr = build_int_cst (integer_type_node, src_r->index);
x = gimple_build_call (fn, 2, dst_nr, src_nr); x = gimple_build_call (fn, 2, dst_nr, src_nr);
gsi_insert_before (&gsi, x, GSI_SAME_STMT); gsi_insert_before (&gsi, x, GSI_SAME_STMT);
...@@ -2996,7 +2999,7 @@ lower_resx (basic_block bb, gimple stmt, struct pointer_map_t *mnt_map) ...@@ -2996,7 +2999,7 @@ lower_resx (basic_block bb, gimple stmt, struct pointer_map_t *mnt_map)
else else
{ {
fn = implicit_built_in_decls[BUILT_IN_EH_POINTER]; fn = implicit_built_in_decls[BUILT_IN_EH_POINTER];
src_nr = build_int_cst (NULL, src_r->index); src_nr = build_int_cst (integer_type_node, src_r->index);
x = gimple_build_call (fn, 1, src_nr); x = gimple_build_call (fn, 1, src_nr);
var = create_tmp_var (ptr_type_node, NULL); var = create_tmp_var (ptr_type_node, NULL);
var = make_ssa_name (var, x); var = make_ssa_name (var, x);
...@@ -3170,7 +3173,8 @@ lower_eh_dispatch (basic_block src, gimple stmt) ...@@ -3170,7 +3173,8 @@ lower_eh_dispatch (basic_block src, gimple stmt)
else else
{ {
fn = implicit_built_in_decls[BUILT_IN_EH_FILTER]; fn = implicit_built_in_decls[BUILT_IN_EH_FILTER];
x = gimple_build_call (fn, 1, build_int_cst (NULL, region_nr)); x = gimple_build_call (fn, 1, build_int_cst (integer_type_node,
region_nr));
filter = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL); filter = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL);
filter = make_ssa_name (filter, x); filter = make_ssa_name (filter, x);
gimple_call_set_lhs (x, filter); gimple_call_set_lhs (x, filter);
...@@ -3196,7 +3200,8 @@ lower_eh_dispatch (basic_block src, gimple stmt) ...@@ -3196,7 +3200,8 @@ lower_eh_dispatch (basic_block src, gimple stmt)
edge f_e = FALLTHRU_EDGE (src); edge f_e = FALLTHRU_EDGE (src);
fn = implicit_built_in_decls[BUILT_IN_EH_FILTER]; fn = implicit_built_in_decls[BUILT_IN_EH_FILTER];
x = gimple_build_call (fn, 1, build_int_cst (NULL, region_nr)); x = gimple_build_call (fn, 1, build_int_cst (integer_type_node,
region_nr));
filter = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL); filter = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL);
filter = make_ssa_name (filter, x); filter = make_ssa_name (filter, x);
gimple_call_set_lhs (x, filter); gimple_call_set_lhs (x, filter);
......
...@@ -81,7 +81,7 @@ mf_build_string (const char *string) ...@@ -81,7 +81,7 @@ mf_build_string (const char *string)
tree result = mf_mark (build_string (len + 1, string)); tree result = mf_mark (build_string (len + 1, string));
TREE_TYPE (result) = build_array_type TREE_TYPE (result) = build_array_type
(char_type_node, build_index_type (build_int_cst (NULL_TREE, len))); (char_type_node, build_index_type (size_int (len)));
TREE_CONSTANT (result) = 1; TREE_CONSTANT (result) = 1;
TREE_READONLY (result) = 1; TREE_READONLY (result) = 1;
TREE_STATIC (result) = 1; TREE_STATIC (result) = 1;
...@@ -1251,7 +1251,7 @@ mudflap_register_call (tree obj, tree object_size, tree varname) ...@@ -1251,7 +1251,7 @@ mudflap_register_call (tree obj, tree object_size, tree varname)
arg, arg,
convert (size_type_node, object_size), convert (size_type_node, object_size),
/* __MF_TYPE_STATIC */ /* __MF_TYPE_STATIC */
build_int_cst (NULL_TREE, 4), build_int_cst (integer_type_node, 4),
varname); varname);
append_to_statement_list (call_stmt, &enqueued_call_stmt_chain); append_to_statement_list (call_stmt, &enqueued_call_stmt_chain);
...@@ -1284,7 +1284,7 @@ mudflap_enqueue_constant (tree obj) ...@@ -1284,7 +1284,7 @@ mudflap_enqueue_constant (tree obj)
return; return;
if (TREE_CODE (obj) == STRING_CST) if (TREE_CODE (obj) == STRING_CST)
object_size = build_int_cst (NULL_TREE, TREE_STRING_LENGTH (obj)); object_size = size_int (TREE_STRING_LENGTH (obj));
else else
object_size = size_in_bytes (TREE_TYPE (obj)); object_size = size_in_bytes (TREE_TYPE (obj));
......
...@@ -486,7 +486,7 @@ get_trampoline_type (struct nesting_info *info) ...@@ -486,7 +486,7 @@ get_trampoline_type (struct nesting_info *info)
align = STACK_BOUNDARY; align = STACK_BOUNDARY;
} }
t = build_index_type (build_int_cst (NULL_TREE, size - 1)); t = build_index_type (size_int (size - 1));
t = build_array_type (char_type_node, t); t = build_array_type (char_type_node, t);
t = build_decl (DECL_SOURCE_LOCATION (info->context), t = build_decl (DECL_SOURCE_LOCATION (info->context),
FIELD_DECL, get_identifier ("__data"), t); FIELD_DECL, get_identifier ("__data"), t);
...@@ -561,7 +561,7 @@ get_nl_goto_field (struct nesting_info *info) ...@@ -561,7 +561,7 @@ get_nl_goto_field (struct nesting_info *info)
size = size + 1; size = size + 1;
type = build_array_type type = build_array_type
(type, build_index_type (build_int_cst (NULL_TREE, size))); (type, build_index_type (size_int (size)));
field = make_node (FIELD_DECL); field = make_node (FIELD_DECL);
DECL_NAME (field) = get_identifier ("__nl_goto_buf"); DECL_NAME (field) = get_identifier ("__nl_goto_buf");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment