+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-pre.c (pretemp, storetemp, prephitemp): Remove.
+ (need_creation): Remove.
+ (get_representative_for): Use anonymous named SSA names.
+ (create_expression_by_pieces): Likewise.
+ (insert_into_preds_of_block): Likewise.
+ (init_pre): Do not init removed vars.
+ (fini_pre): Do not free need_creation.
+ * tree-ssa-forwprop.c (simplify_bitwise_binary): Use anonymous
+ SSA names.
+ * tree-ssa-loop-manip.c (create_iv): Likewise.
+ * value-prof.c (gimple_divmod_fixed_value): Likewise.
+ (gimple_mod_pow2): Likewise.
+ (gimple_mod_subtract): Likewise.
+ (gimple_ic): Likewise.
+ (gimple_stringop_fixed_value): Likewise.
+ * tree-ssa-phiopt.c (condstoretemp): Remove.
+ (tree_ssa_phiopt_worker): Use anonymous named SSA names.
+ (conditional_replacement): Likewise.
+ (abs_replacement): Likewise.
+ (cond_store_replacement): Likewise.
+ (cond_if_else_store_replacement_1): Likewise.
+ * tree-ssa-loop-im.c (rewrite_reciprocal): Likewise.
+ (rewrite_bittest): Likewise.
+ * tree-ssa-reassoc.c (build_and_add_sum): Get type from callers
+ and build anonymous SSA names.
+ (undistribute_ops_list): Adjust.
+ (eliminate_redundant_comparison): Use anonymous SSA names.
+ (rewrite_expr_tree_parallel): Likewise.
+ (get_reassoc_pow_ssa_name): Remove.
+ (attempt_builtin_powi): Adjust.
+ (reassociate_bb): Likewise.
+ * tree-ssa-strlen.c (get_string_length): Use anonymous SSA names.
+ * tree-switch-conversion.c (emit_case_bit_tests): Likewise.
+ (build_arrays): Likewise.
+ * tree-tailcall.c (adjust_return_value_with_ops): Likewise.
+ (create_tailcall_accumulator): Likewise.
+ * tree-vect-generic.c (expand_vector_divmod): Likewise.
+ * tree-profile.c (gcov_type_tmp_var): Remove.
+ (gimple_init_edge_profiler): Do not initialize it and use anonymous
+ SSA names.
+ (gimple_gen_ic_profiler): Likewise.
+ (tree_profiling): Adjust.
+ * tree-sra.c (build_ref_for_offset): Use anonymous SSA names.
+ * tree-ssa-math-opts.c (execute_cse_sincos_1): Likewise.
+ (powi_as_mults_1): Likewise.
+ (powi_as_mults): Likewise.
+ (build_and_insert_call): Adjust.
+ (build_and_insert_binop): Likewise.
+ (build_and_insert_ref): Likewise.
+ (build_and_insert_cast): Likewise.
+ (gimple_expand_builtin_pow): Likewise.
+ (gimple_expand_builtin_cabs): Likewise.
+ (execute_optimize_bswap): Use anonymous SSA names.
+ (convert_mult_to_widen): Likewise.
+ (convert_plusminus_to_widen): Likewise.
+ * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
+ * tree-ssa-propagate.c (update_call_from_tree): Likewise.
+ * tree-if-conv.c (ifc_temp_var): Likewise.
+ * tree-loop-distribution.c (generate_memset_builtin): Likewise.
+ * tree-parloops.c (take_address_of): Likewise.
+ * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
+ (vect_permute_load_chain): Likewise.
+ * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
+ * tree-vect-patterns.c (vect_recog_temp_ssa_var): Likewise.
+ (vect_handle_widen_op_by_const): Likewise.
+ (vect_operation_fits_smaller_type): Likewise.
+ (vect_recog_over_widening_pattern): Likewise.
+ * tree-vect-stmts.c (vect_init_vector): Likewise.
+ * tree-vrp.c (simplify_truth_ops_using_ranges): Likewise.
+ (simplify_float_conversion_using_ranges): Likewise.
+
2012-08-10 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Fix builtin
static tree
ifc_temp_var (tree type, tree expr, gimple_stmt_iterator *gsi)
{
- const char *name = "_ifc_";
- tree var, new_name;
- gimple stmt;
-
- /* Create new temporary variable. */
- var = create_tmp_var (type, name);
-
- /* Build new statement to assign EXPR to new variable. */
- stmt = gimple_build_assign (var, expr);
-
- /* Get SSA name for the new variable and set make new statement
- its definition statement. */
- new_name = make_ssa_name (var, stmt);
- gimple_assign_set_lhs (stmt, new_name);
- SSA_NAME_DEF_STMT (new_name) = stmt;
- update_stmt (stmt);
-
+ tree new_name = make_temp_ssa_name (type, NULL, "_ifc_");
+ gimple stmt = gimple_build_assign (new_name, expr);
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
- return gimple_assign_lhs (stmt);
+ return new_name;
}
/* Return true when COND is a true predicate. */
else if (!useless_type_conversion_p (integer_type_node, TREE_TYPE (val)))
{
gimple cstmt;
- tree tem = create_tmp_reg (integer_type_node, NULL);
- tem = make_ssa_name (tem, NULL);
+ tree tem = make_ssa_name (integer_type_node, NULL);
cstmt = gimple_build_assign_with_ops (NOP_EXPR, tem, val, NULL_TREE);
gsi_insert_after (&gsi, cstmt, GSI_CONTINUE_LINKING);
val = tem;
int uid;
void **dslot;
struct int_tree_map ielt, *nielt;
- tree *var_p, name, bvar, addr;
+ tree *var_p, name, addr;
gimple stmt;
gimple_seq stmts;
if (gsi == NULL)
return NULL;
addr = TREE_OPERAND (*var_p, 0);
- bvar = create_tmp_var (TREE_TYPE (addr),
- get_name (TREE_OPERAND
- (TREE_OPERAND (*var_p, 0), 0)));
- stmt = gimple_build_assign (bvar, addr);
- name = make_ssa_name (bvar, stmt);
- gimple_assign_set_lhs (stmt, name);
+ name = make_temp_ssa_name (TREE_TYPE (addr), NULL,
+ get_name (TREE_OPERAND
+ (TREE_OPERAND (*var_p, 0), 0)));
+ stmt = gimple_build_assign (name, addr);
gsi_insert_on_edge_immediate (entry, stmt);
nielt = XNEW (struct int_tree_map);
#include "target.h"
static GTY(()) tree gcov_type_node;
-static GTY(()) tree gcov_type_tmp_var;
static GTY(()) tree tree_interval_profiler_fn;
static GTY(()) tree tree_pow2_profiler_fn;
static GTY(()) tree tree_one_value_profiler_fn;
void
gimple_gen_edge_profiler (int edgeno, edge e)
{
- tree ref, one;
+ tree ref, one, gcov_type_tmp_var;
gimple stmt1, stmt2, stmt3;
- /* We share one temporary variable declaration per function. This
- gets re-set in tree_profiling. */
- if (gcov_type_tmp_var == NULL_TREE)
- gcov_type_tmp_var = create_tmp_reg (gcov_type_node, "PROF_edge_counter");
ref = tree_coverage_counter_ref (GCOV_COUNTER_ARCS, edgeno);
one = build_int_cst (gcov_type_node, 1);
+ gcov_type_tmp_var = make_temp_ssa_name (gcov_type_node,
+ NULL, "PROF_edge_counter");
stmt1 = gimple_build_assign (gcov_type_tmp_var, ref);
- gimple_assign_set_lhs (stmt1, make_ssa_name (gcov_type_tmp_var, stmt1));
+ gcov_type_tmp_var = make_temp_ssa_name (gcov_type_node,
+ NULL, "PROF_edge_counter");
stmt2 = gimple_build_assign_with_ops (PLUS_EXPR, gcov_type_tmp_var,
gimple_assign_lhs (stmt1), one);
- gimple_assign_set_lhs (stmt2, make_ssa_name (gcov_type_tmp_var, stmt2));
stmt3 = gimple_build_assign (unshare_expr (ref), gimple_assign_lhs (stmt2));
gsi_insert_on_edge (e, stmt1);
gsi_insert_on_edge (e, stmt2);
stmt3: __gcov_indirect_call_callee = tmp1;
*/
- tmp1 = create_tmp_reg (ptr_void, "PROF");
stmt1 = gimple_build_assign (ic_gcov_type_ptr_var, ref_ptr);
+ tmp1 = make_temp_ssa_name (ptr_void, NULL, "PROF");
stmt2 = gimple_build_assign (tmp1, unshare_expr (value->hvalue.value));
- gimple_assign_set_lhs (stmt2, make_ssa_name (tmp1, stmt2));
stmt3 = gimple_build_assign (ic_void_ptr_var, gimple_assign_lhs (stmt2));
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
push_cfun (DECL_STRUCT_FUNCTION (node->symbol.decl));
current_function_decl = node->symbol.decl;
- /* Re-set global shared temporary variable for edge-counters. */
- gcov_type_tmp_var = NULL_TREE;
-
/* Local pure-const may imply need to fixup the cfg. */
if (execute_fixup_cfg () & TODO_cleanup_cfg)
cleanup_tree_cfg ();
tree tmp, addr;
gcc_checking_assert (gsi);
- tmp = create_tmp_reg (build_pointer_type (TREE_TYPE (prev_base)), NULL);
- tmp = make_ssa_name (tmp, NULL);
+ tmp = make_ssa_name (build_pointer_type (TREE_TYPE (prev_base)), NULL);
addr = build_fold_addr_expr (unshare_expr (prev_base));
STRIP_USELESS_TYPE_CONVERSION (addr);
stmt = gimple_build_assign (tmp, addr);
gimple_set_location (stmt, loc);
- SSA_NAME_DEF_STMT (tmp) = stmt;
if (insert_after)
gsi_insert_after (gsi, stmt, GSI_NEW_STMT);
else
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
- update_stmt (stmt);
off = build_int_cst (reference_alias_ptr_type (prev_base),
offset / BITS_PER_UNIT);
&& int_fits_type_p (arg2, TREE_TYPE (def1_arg1)))
{
gimple newop;
- tree tem = create_tmp_reg (TREE_TYPE (def1_arg1), NULL);
+ tree tem = make_ssa_name (TREE_TYPE (def1_arg1), NULL);
newop =
gimple_build_assign_with_ops (code, tem, def1_arg1,
fold_convert_loc (gimple_location (stmt),
TREE_TYPE (def1_arg1),
arg2));
- tem = make_ssa_name (tem, newop);
- gimple_assign_set_lhs (newop, tem);
gimple_set_location (newop, gimple_location (stmt));
gsi_insert_before (gsi, newop, GSI_SAME_STMT);
gimple_assign_set_rhs_with_ops_1 (gsi, NOP_EXPR,
!= GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (arg1))))))
{
gimple newop;
- tree tem = create_tmp_reg (TREE_TYPE (def1_arg1),
- NULL);
+ tree tem = make_ssa_name (TREE_TYPE (def1_arg1), NULL);
newop = gimple_build_assign_with_ops (code, tem, def1_arg1, def2_arg1);
- tem = make_ssa_name (tem, newop);
- gimple_assign_set_lhs (newop, tem);
gimple_set_location (newop, gimple_location (stmt));
gsi_insert_before (gsi, newop, GSI_SAME_STMT);
gimple_assign_set_rhs_with_ops_1 (gsi, NOP_EXPR,
{
gimple newop;
tree tem;
- tem = create_tmp_reg (TREE_TYPE (arg2), NULL);
+ tem = make_ssa_name (TREE_TYPE (arg2), NULL);
newop = gimple_build_assign_with_ops (code, tem, a, c);
- tem = make_ssa_name (tem, newop);
- gimple_assign_set_lhs (newop, tem);
gimple_set_location (newop, gimple_location (stmt));
/* Make sure to re-process the new stmt as it's walking upwards. */
gsi_insert_before (gsi, newop, GSI_NEW_STMT);
update_stmt (stmt);
return true;
}
- tem = create_tmp_reg (TREE_TYPE (arg2), NULL);
+ tem = make_ssa_name (TREE_TYPE (arg2), NULL);
newop = gimple_build_assign_with_ops (BIT_AND_EXPR,
tem, def1_arg1, arg2);
- tem = make_ssa_name (tem, newop);
- gimple_assign_set_lhs (newop, tem);
gimple_set_location (newop, gimple_location (stmt));
/* Make sure to re-process the new stmt as it's walking upwards. */
gsi_insert_before (gsi, newop, GSI_NEW_STMT);
rewrite_reciprocal (gimple_stmt_iterator *bsi)
{
gimple stmt, stmt1, stmt2;
- tree var, name, lhs, type;
+ tree name, lhs, type;
tree real_one;
gimple_stmt_iterator gsi;
lhs = gimple_assign_lhs (stmt);
type = TREE_TYPE (lhs);
- var = create_tmp_reg (type, "reciptmp");
-
real_one = build_one_cst (type);
- stmt1 = gimple_build_assign_with_ops (RDIV_EXPR,
- var, real_one, gimple_assign_rhs2 (stmt));
- name = make_ssa_name (var, stmt1);
- gimple_assign_set_lhs (stmt1, name);
+ name = make_temp_ssa_name (type, NULL, "reciptmp");
+ stmt1 = gimple_build_assign_with_ops (RDIV_EXPR, name, real_one,
+ gimple_assign_rhs2 (stmt));
stmt2 = gimple_build_assign_with_ops (MULT_EXPR, lhs, name,
gimple_assign_rhs1 (stmt));
rewrite_bittest (gimple_stmt_iterator *bsi)
{
gimple stmt, use_stmt, stmt1, stmt2;
- tree lhs, var, name, t, a, b;
+ tree lhs, name, t, a, b;
use_operand_p use;
stmt = gsi_stmt (*bsi);
gimple_stmt_iterator rsi;
/* 1 << B */
- var = create_tmp_var (TREE_TYPE (a), "shifttmp");
t = fold_build2 (LSHIFT_EXPR, TREE_TYPE (a),
build_int_cst (TREE_TYPE (a), 1), b);
- stmt1 = gimple_build_assign (var, t);
- name = make_ssa_name (var, stmt1);
- gimple_assign_set_lhs (stmt1, name);
+ name = make_temp_ssa_name (TREE_TYPE (a), NULL, "shifttmp");
+ stmt1 = gimple_build_assign (name, t);
/* A & (1 << B) */
t = fold_build2 (BIT_AND_EXPR, TREE_TYPE (a), a, name);
- stmt2 = gimple_build_assign (var, t);
- name = make_ssa_name (var, stmt2);
- gimple_assign_set_lhs (stmt2, name);
+ name = make_temp_ssa_name (TREE_TYPE (a), NULL, "shifttmp");
+ stmt2 = gimple_build_assign (name, t);
/* Replace the SSA_NAME we compare against zero. Adjust
the type of zero accordingly. */
enum tree_code incr_op = PLUS_EXPR;
edge pe = loop_preheader_edge (loop);
- if (!var)
- var = create_tmp_var (TREE_TYPE (base), "ivtmp");
-
- vb = make_ssa_name (var, NULL);
+ if (var != NULL_TREE)
+ {
+ vb = make_ssa_name (var, NULL);
+ va = make_ssa_name (var, NULL);
+ }
+ else
+ {
+ vb = make_temp_ssa_name (TREE_TYPE (base), NULL, "ivtmp");
+ va = make_temp_ssa_name (TREE_TYPE (base), NULL, "ivtmp");
+ }
if (var_before)
*var_before = vb;
- va = make_ssa_name (var, NULL);
if (var_after)
*var_after = va;
fndecl = mathfn_built_in (type, BUILT_IN_CEXPI);
if (!fndecl)
return false;
- res = create_tmp_reg (TREE_TYPE (TREE_TYPE (fndecl)), "sincostmp");
stmt = gimple_build_call (fndecl, 1, name);
- res = make_ssa_name (res, stmt);
+ res = make_temp_ssa_name (TREE_TYPE (TREE_TYPE (fndecl)), stmt, "sincostmp");
gimple_call_set_lhs (stmt, res);
def_stmt = SSA_NAME_DEF_STMT (name);
gsi = gsi_after_labels (top_bb);
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
}
- update_stmt (stmt);
sincos_stats.inserted++;
/* And adjust the recorded old call sites. */
static tree
powi_as_mults_1 (gimple_stmt_iterator *gsi, location_t loc, tree type,
- HOST_WIDE_INT n, tree *cache, tree target)
+ HOST_WIDE_INT n, tree *cache)
{
tree op0, op1, ssa_target;
unsigned HOST_WIDE_INT digit;
if (n < POWI_TABLE_SIZE && cache[n])
return cache[n];
- ssa_target = make_ssa_name (target, NULL);
+ ssa_target = make_temp_ssa_name (type, NULL, "powmult");
if (n < POWI_TABLE_SIZE)
{
cache[n] = ssa_target;
- op0 = powi_as_mults_1 (gsi, loc, type, n - powi_table[n], cache, target);
- op1 = powi_as_mults_1 (gsi, loc, type, powi_table[n], cache, target);
+ op0 = powi_as_mults_1 (gsi, loc, type, n - powi_table[n], cache);
+ op1 = powi_as_mults_1 (gsi, loc, type, powi_table[n], cache);
}
else if (n & 1)
{
digit = n & ((1 << POWI_WINDOW_SIZE) - 1);
- op0 = powi_as_mults_1 (gsi, loc, type, n - digit, cache, target);
- op1 = powi_as_mults_1 (gsi, loc, type, digit, cache, target);
+ op0 = powi_as_mults_1 (gsi, loc, type, n - digit, cache);
+ op1 = powi_as_mults_1 (gsi, loc, type, digit, cache);
}
else
{
- op0 = powi_as_mults_1 (gsi, loc, type, n >> 1, cache, target);
+ op0 = powi_as_mults_1 (gsi, loc, type, n >> 1, cache);
op1 = op0;
}
powi_as_mults (gimple_stmt_iterator *gsi, location_t loc,
tree arg0, HOST_WIDE_INT n)
{
- tree cache[POWI_TABLE_SIZE], result, type = TREE_TYPE (arg0), target;
+ tree cache[POWI_TABLE_SIZE], result, type = TREE_TYPE (arg0);
gimple div_stmt;
+ tree target;
if (n == 0)
return build_real (type, dconst1);
memset (cache, 0, sizeof (cache));
cache[1] = arg0;
- target = create_tmp_reg (type, "powmult");
- result = powi_as_mults_1 (gsi, loc, type, (n < 0) ? -n : n, cache, target);
-
+ result = powi_as_mults_1 (gsi, loc, type, (n < 0) ? -n : n, cache);
if (n >= 0)
return result;
/* If the original exponent was negative, reciprocate the result. */
- target = make_ssa_name (target, NULL);
+ target = make_temp_ssa_name (type, NULL, "powmult");
div_stmt = gimple_build_assign_with_ops (RDIV_EXPR, target,
build_real (type, dconst1),
result);
}
/* Build a gimple call statement that calls FN with argument ARG.
- Set the lhs of the call statement to a fresh SSA name for
- variable VAR. If VAR is NULL, first allocate it. Insert the
+ Set the lhs of the call statement to a fresh SSA name. Insert the
statement prior to GSI's current position, and return the fresh
SSA name. */
static tree
build_and_insert_call (gimple_stmt_iterator *gsi, location_t loc,
- tree *var, tree fn, tree arg)
+ tree fn, tree arg)
{
gimple call_stmt;
tree ssa_target;
- if (!*var)
- *var = create_tmp_reg (TREE_TYPE (arg), "powroot");
-
call_stmt = gimple_build_call (fn, 1, arg);
- ssa_target = make_ssa_name (*var, NULL);
+ ssa_target = make_temp_ssa_name (TREE_TYPE (arg), NULL, "powroot");
gimple_set_lhs (call_stmt, ssa_target);
gimple_set_location (call_stmt, loc);
gsi_insert_before (gsi, call_stmt, GSI_SAME_STMT);
static tree
build_and_insert_binop (gimple_stmt_iterator *gsi, location_t loc,
- tree target, enum tree_code code, tree arg0, tree arg1)
+ const char *name, enum tree_code code,
+ tree arg0, tree arg1)
{
- tree result = make_ssa_name (target, NULL);
+ tree result = make_temp_ssa_name (TREE_TYPE (arg0), NULL, name);
gimple stmt = gimple_build_assign_with_ops (code, result, arg0, arg1);
gimple_set_location (stmt, loc);
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
}
/* Build a gimple reference operation with the given CODE and argument
- ARG, assigning the result to a new SSA name for variable TARGET.
+ ARG, assigning the result to a new SSA name of TYPE with NAME.
Insert the statement prior to GSI's current position, and return
the fresh SSA name. */
static inline tree
build_and_insert_ref (gimple_stmt_iterator *gsi, location_t loc, tree type,
- tree target, enum tree_code code, tree arg0)
+ const char *name, enum tree_code code, tree arg0)
{
- tree result = make_ssa_name (target, NULL);
+ tree result = make_temp_ssa_name (type, NULL, name);
gimple stmt = gimple_build_assign (result, build1 (code, type, arg0));
gimple_set_location (stmt, loc);
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
return result;
}
-/* Build a gimple assignment to cast VAL to TARGET. Insert the statement
+/* Build a gimple assignment to cast VAL to TYPE. Insert the statement
prior to GSI's current position, and return the fresh SSA name. */
static tree
build_and_insert_cast (gimple_stmt_iterator *gsi, location_t loc,
- tree target, tree val)
+ tree type, tree val)
{
- return build_and_insert_binop (gsi, loc, target, CONVERT_EXPR, val, NULL);
+ tree result = make_ssa_name (type, NULL);
+ gimple stmt = gimple_build_assign_with_ops (NOP_EXPR, result, val, NULL_TREE);
+ gimple_set_location (stmt, loc);
+ gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
+ return result;
}
/* ARG0 and ARG1 are the two arguments to a pow builtin call in GSI
REAL_VALUE_TYPE c2, dconst3;
HOST_WIDE_INT n;
tree type, sqrtfn, cbrtfn, sqrt_arg0, sqrt_sqrt, result, cbrt_x, powi_cbrt_x;
- tree target = NULL_TREE;
enum machine_mode mode;
bool hw_sqrt_exists;
if (sqrtfn
&& REAL_VALUES_EQUAL (c, dconsthalf)
&& !HONOR_SIGNED_ZEROS (mode))
- return build_and_insert_call (gsi, loc, &target, sqrtfn, arg0);
+ return build_and_insert_call (gsi, loc, sqrtfn, arg0);
/* Optimize pow(x,0.25) = sqrt(sqrt(x)). Assume on most machines that
a builtin sqrt instruction is smaller than a call to pow with 0.25,
&& hw_sqrt_exists)
{
/* sqrt(x) */
- sqrt_arg0 = build_and_insert_call (gsi, loc, &target, sqrtfn, arg0);
+ sqrt_arg0 = build_and_insert_call (gsi, loc, sqrtfn, arg0);
/* sqrt(sqrt(x)) */
- return build_and_insert_call (gsi, loc, &target, sqrtfn, sqrt_arg0);
+ return build_and_insert_call (gsi, loc, sqrtfn, sqrt_arg0);
}
/* Optimize pow(x,0.75) = sqrt(x) * sqrt(sqrt(x)) unless we are
&& hw_sqrt_exists)
{
/* sqrt(x) */
- sqrt_arg0 = build_and_insert_call (gsi, loc, &target, sqrtfn, arg0);
+ sqrt_arg0 = build_and_insert_call (gsi, loc, sqrtfn, arg0);
/* sqrt(sqrt(x)) */
- sqrt_sqrt = build_and_insert_call (gsi, loc, &target, sqrtfn, sqrt_arg0);
+ sqrt_sqrt = build_and_insert_call (gsi, loc, sqrtfn, sqrt_arg0);
/* sqrt(x) * sqrt(sqrt(x)) */
- return build_and_insert_binop (gsi, loc, target, MULT_EXPR,
+ return build_and_insert_binop (gsi, loc, "powroot", MULT_EXPR,
sqrt_arg0, sqrt_sqrt);
}
&& cbrtfn
&& (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
&& REAL_VALUES_EQUAL (c, dconst1_3))
- return build_and_insert_call (gsi, loc, &target, cbrtfn, arg0);
+ return build_and_insert_call (gsi, loc, cbrtfn, arg0);
/* Optimize pow(x,1./6.) = cbrt(sqrt(x)). Don't do this optimization
if we don't have a hardware sqrt insn. */
&& REAL_VALUES_EQUAL (c, dconst1_6))
{
/* sqrt(x) */
- sqrt_arg0 = build_and_insert_call (gsi, loc, &target, sqrtfn, arg0);
+ sqrt_arg0 = build_and_insert_call (gsi, loc, sqrtfn, arg0);
/* cbrt(sqrt(x)) */
- return build_and_insert_call (gsi, loc, &target, cbrtfn, sqrt_arg0);
+ return build_and_insert_call (gsi, loc, cbrtfn, sqrt_arg0);
}
/* Optimize pow(x,c), where n = 2c for some nonzero integer n, into
/* Calculate sqrt(x). When n is not 1 or -1, multiply it by the
result of the optimal multiply sequence just calculated. */
- sqrt_arg0 = build_and_insert_call (gsi, loc, &target, sqrtfn, arg0);
+ sqrt_arg0 = build_and_insert_call (gsi, loc, sqrtfn, arg0);
if (absu_hwi (n) == 1)
result = sqrt_arg0;
else
- result = build_and_insert_binop (gsi, loc, target, MULT_EXPR,
+ result = build_and_insert_binop (gsi, loc, "powroot", MULT_EXPR,
sqrt_arg0, powi_x_ndiv2);
/* If n is negative, reciprocate the result. */
if (n < 0)
- result = build_and_insert_binop (gsi, loc, target, RDIV_EXPR,
+ result = build_and_insert_binop (gsi, loc, "powroot", RDIV_EXPR,
build_real (type, dconst1), result);
return result;
}
/* Calculate powi(cbrt(x), n%3). Don't use gimple_expand_builtin_powi
as that creates an unnecessary variable. Instead, just produce
either cbrt(x) or cbrt(x) * cbrt(x). */
- cbrt_x = build_and_insert_call (gsi, loc, &target, cbrtfn, arg0);
+ cbrt_x = build_and_insert_call (gsi, loc, cbrtfn, arg0);
if (absu_hwi (n) % 3 == 1)
powi_cbrt_x = cbrt_x;
else
- powi_cbrt_x = build_and_insert_binop (gsi, loc, target, MULT_EXPR,
+ powi_cbrt_x = build_and_insert_binop (gsi, loc, "powroot", MULT_EXPR,
cbrt_x, cbrt_x);
/* Multiply the two subexpressions, unless powi(x,abs(n)/3) = 1. */
if (absu_hwi (n) < 3)
result = powi_cbrt_x;
else
- result = build_and_insert_binop (gsi, loc, target, MULT_EXPR,
+ result = build_and_insert_binop (gsi, loc, "powroot", MULT_EXPR,
powi_x_ndiv3, powi_cbrt_x);
/* If n is negative, reciprocate the result. */
if (n < 0)
- result = build_and_insert_binop (gsi, loc, target, RDIV_EXPR,
+ result = build_and_insert_binop (gsi, loc, "powroot", RDIV_EXPR,
build_real (type, dconst1), result);
return result;
static tree
gimple_expand_builtin_cabs (gimple_stmt_iterator *gsi, location_t loc, tree arg)
{
- tree target, real_part, imag_part, addend1, addend2, sum, result;
+ tree real_part, imag_part, addend1, addend2, sum, result;
tree type = TREE_TYPE (TREE_TYPE (arg));
tree sqrtfn = mathfn_built_in (type, BUILT_IN_SQRT);
enum machine_mode mode = TYPE_MODE (type);
|| optab_handler (sqrt_optab, mode) == CODE_FOR_nothing)
return NULL_TREE;
- target = create_tmp_reg (type, "cabs");
- real_part = build_and_insert_ref (gsi, loc, type, target,
+ real_part = build_and_insert_ref (gsi, loc, type, "cabs",
REALPART_EXPR, arg);
- addend1 = build_and_insert_binop (gsi, loc, target, MULT_EXPR,
+ addend1 = build_and_insert_binop (gsi, loc, "cabs", MULT_EXPR,
real_part, real_part);
- imag_part = build_and_insert_ref (gsi, loc, type, target,
+ imag_part = build_and_insert_ref (gsi, loc, type, "cabs",
IMAGPART_EXPR, arg);
- addend2 = build_and_insert_binop (gsi, loc, target, MULT_EXPR,
+ addend2 = build_and_insert_binop (gsi, loc, "cabs", MULT_EXPR,
imag_part, imag_part);
- sum = build_and_insert_binop (gsi, loc, target, PLUS_EXPR, addend1, addend2);
- result = build_and_insert_call (gsi, loc, &target, sqrtfn, sum);
+ sum = build_and_insert_binop (gsi, loc, "cabs", PLUS_EXPR, addend1, addend2);
+ result = build_and_insert_call (gsi, loc, sqrtfn, sum);
return result;
}
if (!useless_type_conversion_p (TREE_TYPE (bswap_tmp), bswap_type))
{
gimple convert_stmt;
-
- bswap_tmp = create_tmp_var (bswap_type, "bswapsrc");
- bswap_tmp = make_ssa_name (bswap_tmp, NULL);
-
- convert_stmt = gimple_build_assign_with_ops (
- CONVERT_EXPR, bswap_tmp, bswap_src, NULL);
+ bswap_tmp = make_temp_ssa_name (bswap_type, NULL, "bswapsrc");
+ convert_stmt = gimple_build_assign_with_ops
+ (NOP_EXPR, bswap_tmp, bswap_src, NULL);
gsi_insert_before (&gsi, convert_stmt, GSI_SAME_STMT);
}
if (!useless_type_conversion_p (TREE_TYPE (bswap_tmp), bswap_type))
{
gimple convert_stmt;
-
- bswap_tmp = create_tmp_var (bswap_type, "bswapdst");
- bswap_tmp = make_ssa_name (bswap_tmp, NULL);
- convert_stmt = gimple_build_assign_with_ops (
- CONVERT_EXPR, gimple_assign_lhs (stmt), bswap_tmp, NULL);
+ bswap_tmp = make_temp_ssa_name (bswap_type, NULL, "bswapdst");
+ convert_stmt = gimple_build_assign_with_ops
+ (NOP_EXPR, gimple_assign_lhs (stmt), bswap_tmp, NULL);
gsi_insert_after (&gsi, convert_stmt, GSI_SAME_STMT);
}
static bool
convert_mult_to_widen (gimple stmt, gimple_stmt_iterator *gsi)
{
- tree lhs, rhs1, rhs2, type, type1, type2, tmp = NULL;
+ tree lhs, rhs1, rhs2, type, type1, type2;
enum insn_code handler;
enum machine_mode to_mode, from_mode, actual_mode;
optab op;
return false;
if (actual_precision != TYPE_PRECISION (type1)
|| from_unsigned1 != TYPE_UNSIGNED (type1))
- {
- tmp = create_tmp_var (build_nonstandard_integer_type
- (actual_precision, from_unsigned1),
- NULL);
- rhs1 = build_and_insert_cast (gsi, loc, tmp, rhs1);
- }
+ rhs1 = build_and_insert_cast (gsi, loc,
+ build_nonstandard_integer_type
+ (actual_precision, from_unsigned1), rhs1);
if (actual_precision != TYPE_PRECISION (type2)
|| from_unsigned2 != TYPE_UNSIGNED (type2))
- {
- /* Reuse the same type info, if possible. */
- if (!tmp || from_unsigned1 != from_unsigned2)
- tmp = create_tmp_var (build_nonstandard_integer_type
- (actual_precision, from_unsigned2),
- NULL);
- rhs2 = build_and_insert_cast (gsi, loc, tmp, rhs2);
- }
+ rhs2 = build_and_insert_cast (gsi, loc,
+ build_nonstandard_integer_type
+ (actual_precision, from_unsigned2), rhs2);
/* Handle constants. */
if (TREE_CODE (rhs1) == INTEGER_CST)
{
gimple rhs1_stmt = NULL, rhs2_stmt = NULL;
gimple conv1_stmt = NULL, conv2_stmt = NULL, conv_stmt;
- tree type, type1, type2, optype, tmp = NULL;
+ tree type, type1, type2, optype;
tree lhs, rhs1, rhs2, mult_rhs1, mult_rhs2, add_rhs;
enum tree_code rhs1_code = ERROR_MARK, rhs2_code = ERROR_MARK;
optab this_optab;
actual_precision = GET_MODE_PRECISION (actual_mode);
if (actual_precision != TYPE_PRECISION (type1)
|| from_unsigned1 != TYPE_UNSIGNED (type1))
- {
- tmp = create_tmp_var (build_nonstandard_integer_type
- (actual_precision, from_unsigned1),
- NULL);
- mult_rhs1 = build_and_insert_cast (gsi, loc, tmp, mult_rhs1);
- }
+ mult_rhs1 = build_and_insert_cast (gsi, loc,
+ build_nonstandard_integer_type
+ (actual_precision, from_unsigned1),
+ mult_rhs1);
if (actual_precision != TYPE_PRECISION (type2)
|| from_unsigned2 != TYPE_UNSIGNED (type2))
- {
- if (!tmp || from_unsigned1 != from_unsigned2)
- tmp = create_tmp_var (build_nonstandard_integer_type
- (actual_precision, from_unsigned2),
- NULL);
- mult_rhs2 = build_and_insert_cast (gsi, loc, tmp, mult_rhs2);
- }
+ mult_rhs2 = build_and_insert_cast (gsi, loc,
+ build_nonstandard_integer_type
+ (actual_precision, from_unsigned2),
+ mult_rhs2);
if (!useless_type_conversion_p (type, TREE_TYPE (add_rhs)))
- add_rhs = build_and_insert_cast (gsi, loc, create_tmp_var (type, NULL),
- add_rhs);
+ add_rhs = build_and_insert_cast (gsi, loc, type, add_rhs);
/* Handle constants. */
if (TREE_CODE (mult_rhs1) == INTEGER_CST)
return phi;
}
-/* For conditional store replacement we need a temporary to
- put the old contents of the memory in. */
-static tree condstoretemp;
-
/* The core routine of conditional store replacement and normal
phi optimizations. Both share much of the infrastructure in how
to match applicable basic block patterns. DO_STORE_ELIM is true
struct pointer_set_t *nontrap = 0;
if (do_store_elim)
- {
- condstoretemp = NULL_TREE;
- /* Calculate the set of non-trapping memory accesses. */
- nontrap = get_non_trapping ();
- }
+ /* Calculate the set of non-trapping memory accesses. */
+ nontrap = get_non_trapping ();
/* Search every basic block for COND_EXPR we may be able to optimize.
{
source_location locus_0, locus_1;
- new_var2 = create_tmp_var (TREE_TYPE (result), NULL);
+ new_var2 = make_ssa_name (TREE_TYPE (result), NULL);
new_stmt = gimple_build_assign_with_ops (CONVERT_EXPR, new_var2,
new_var, NULL);
- new_var2 = make_ssa_name (new_var2, new_stmt);
- gimple_assign_set_lhs (new_stmt, new_var2);
gsi_insert_before (&gsi, new_stmt, GSI_SAME_STMT);
new_var = new_var2;
result = duplicate_ssa_name (result, NULL);
if (negate)
- {
- tree tmp = create_tmp_var (TREE_TYPE (result), NULL);
- lhs = make_ssa_name (tmp, NULL);
- }
+ lhs = make_ssa_name (TREE_TYPE (result), NULL);
else
lhs = result;
edge e0, edge e1, struct pointer_set_t *nontrap)
{
gimple assign = last_and_only_stmt (middle_bb);
- tree lhs, rhs, name;
+ tree lhs, rhs, name, name2;
gimple newphi, new_stmt;
gimple_stmt_iterator gsi;
source_location locus;
gsi_remove (&gsi, true);
release_defs (assign);
- /* 2) Create a temporary where we can store the old content
- of the memory touched by the store, if we need to. */
- if (!condstoretemp || TREE_TYPE (lhs) != TREE_TYPE (condstoretemp))
- condstoretemp = create_tmp_reg (TREE_TYPE (lhs), "cstore");
-
- /* 3) Insert a load from the memory of the store to the temporary
+ /* 2) Insert a load from the memory of the store to the temporary
on the edge which did not contain the store. */
lhs = unshare_expr (lhs);
- new_stmt = gimple_build_assign (condstoretemp, lhs);
- name = make_ssa_name (condstoretemp, new_stmt);
- gimple_assign_set_lhs (new_stmt, name);
+ name = make_temp_ssa_name (TREE_TYPE (lhs), NULL, "cstore");
+ new_stmt = gimple_build_assign (name, lhs);
gimple_set_location (new_stmt, locus);
gsi_insert_on_edge (e1, new_stmt);
- /* 4) Create a PHI node at the join block, with one argument
+ /* 3) Create a PHI node at the join block, with one argument
holding the old RHS, and the other holding the temporary
where we stored the old memory contents. */
- newphi = create_phi_node (condstoretemp, join_bb);
+ name2 = make_temp_ssa_name (TREE_TYPE (lhs), NULL, "cstore");
+ newphi = create_phi_node (name2, join_bb);
add_phi_arg (newphi, rhs, e0, locus);
add_phi_arg (newphi, name, e1, locus);
lhs = unshare_expr (lhs);
new_stmt = gimple_build_assign (lhs, PHI_RESULT (newphi));
- /* 5) Insert that PHI node. */
+ /* 4) Insert that PHI node. */
gsi = gsi_after_labels (join_bb);
if (gsi_end_p (gsi))
{
basic_block join_bb, gimple then_assign,
gimple else_assign)
{
- tree lhs_base, lhs, then_rhs, else_rhs;
+ tree lhs_base, lhs, then_rhs, else_rhs, name;
source_location then_locus, else_locus;
gimple_stmt_iterator gsi;
gimple newphi, new_stmt;
gsi_remove (&gsi, true);
release_defs (else_assign);
- /* 2) Create a temporary where we can store the old content
- of the memory touched by the store, if we need to. */
- if (!condstoretemp || TREE_TYPE (lhs) != TREE_TYPE (condstoretemp))
- condstoretemp = create_tmp_reg (TREE_TYPE (lhs), "cstore");
-
- /* 3) Create a PHI node at the join block, with one argument
+ /* 2) Create a PHI node at the join block, with one argument
holding the old RHS, and the other holding the temporary
where we stored the old memory contents. */
- newphi = create_phi_node (condstoretemp, join_bb);
+ name = make_temp_ssa_name (TREE_TYPE (lhs), NULL, "cstore");
+ newphi = create_phi_node (name, join_bb);
add_phi_arg (newphi, then_rhs, EDGE_SUCC (then_bb, 0), then_locus);
add_phi_arg (newphi, else_rhs, EDGE_SUCC (else_bb, 0), else_locus);
new_stmt = gimple_build_assign (lhs, PHI_RESULT (newphi));
- /* 4) Insert that PHI node. */
+ /* 3) Insert that PHI node. */
gsi = gsi_after_labels (join_bb);
if (gsi_end_p (gsi))
{
{
tree rhs = gimple_assign_rhs1 (use_stmt);
gcc_assert (TREE_CODE (old_arg) == ADDR_EXPR);
- new_var = create_tmp_reg (TREE_TYPE (rhs), NULL);
+ new_var = make_ssa_name (TREE_TYPE (rhs), NULL);
if (!is_gimple_min_invariant (old_arg))
old_arg = PHI_ARG_DEF_FROM_EDGE (phi, e);
else
fold_build2 (MEM_REF, TREE_TYPE (rhs),
old_arg,
TREE_OPERAND (rhs, 1)));
- gcc_assert (is_gimple_reg (new_var));
- new_var = make_ssa_name (new_var, tmp);
- gimple_assign_set_lhs (tmp, new_var);
gimple_set_location (tmp, locus);
gsi_insert_on_edge (e, tmp);
static alloc_pool bitmap_set_pool;
static bitmap_obstack grand_bitmap_obstack;
-/* To avoid adding 300 temporary variables when we only need one, we
- only create one temporary variable, on demand, and build ssa names
- off that. We do have to change the variable if the types don't
- match the current variable's type. */
-static tree pretemp;
-static tree storetemp;
-static tree prephitemp;
-
/* Set of blocks with statements that have had their EH properties changed. */
static bitmap need_eh_cleanup;
static tree
get_representative_for (const pre_expr e)
{
- tree exprtype;
tree name;
unsigned int value_id = get_expr_value_id (e);
fprintf (dump_file, "\n");
}
- exprtype = get_expr_type (e);
-
/* Build and insert the assignment of the end result to the temporary
that we will return. */
- if (!pretemp || exprtype != TREE_TYPE (pretemp))
- pretemp = create_tmp_reg (exprtype, "pretmp");
-
- name = make_ssa_name (pretemp, gimple_build_nop ());
+ name = make_temp_ssa_name (get_expr_type (e), gimple_build_nop (), "pretmp");
VN_INFO_GET (name)->value_id = value_id;
if (e->kind == CONSTANT)
VN_INFO (name)->valnum = PRE_EXPR_CONSTANT (e);
that didn't turn out to be necessary. */
static bitmap inserted_exprs;
-/* Pool allocated fake store expressions are placed onto this
- worklist, which, after performing dead code elimination, is walked
- to see which expressions need to be put into GC'able memory */
-static VEC(gimple, heap) *need_creation;
-
/* The actual worker for create_component_ref_by_pieces. */
static tree
create_expression_by_pieces (basic_block block, pre_expr expr,
gimple_seq *stmts, gimple domstmt, tree type)
{
- tree temp, name;
+ tree name;
tree folded;
gimple_seq forced_stmts = NULL;
unsigned int value_id;
gimple_seq_add_seq (stmts, forced_stmts);
}
- /* Build and insert the assignment of the end result to the temporary
- that we will return. */
- if (!pretemp || exprtype != TREE_TYPE (pretemp))
- pretemp = create_tmp_reg (exprtype, "pretmp");
-
- temp = pretemp;
-
- newstmt = gimple_build_assign (temp, folded);
- name = make_ssa_name (temp, newstmt);
- gimple_assign_set_lhs (newstmt, name);
+ name = make_temp_ssa_name (exprtype, NULL, "pretmp");
+ newstmt = gimple_build_assign (name, folded);
gimple_set_plf (newstmt, NECESSARY, false);
gimple_seq_add_stmt (stmts, newstmt);
return false;
/* Now build a phi for the new variable. */
- if (!prephitemp || TREE_TYPE (prephitemp) != type)
- prephitemp = create_tmp_var (type, "prephitmp");
-
- temp = prephitemp;
-
- if (TREE_CODE (type) == COMPLEX_TYPE
- || TREE_CODE (type) == VECTOR_TYPE)
- DECL_GIMPLE_REG_P (temp) = 1;
+ temp = make_temp_ssa_name (type, NULL, "prephitmp");
phi = create_phi_node (temp, block);
gimple_set_plf (phi, NECESSARY, false);
in_fre = do_fre;
inserted_exprs = BITMAP_ALLOC (NULL);
- need_creation = NULL;
- pretemp = NULL_TREE;
- storetemp = NULL_TREE;
- prephitemp = NULL_TREE;
connect_infinite_loops_to_exit ();
memset (&pre_stats, 0, sizeof (pre_stats));
free (postorder);
VEC_free (bitmap_set_t, heap, value_expressions);
BITMAP_FREE (inserted_exprs);
- VEC_free (gimple, heap, need_creation);
bitmap_obstack_release (&grand_bitmap_obstack);
free_alloc_pool (bitmap_set_pool);
free_alloc_pool (pre_expr_pool);
variable. Create an assignment statement
with a dummy (unused) lhs variable. */
STRIP_USELESS_TYPE_CONVERSION (expr);
- lhs = create_tmp_var (TREE_TYPE (expr), NULL);
- new_stmt = gimple_build_assign (lhs, expr);
if (gimple_in_ssa_p (cfun))
- lhs = make_ssa_name (lhs, new_stmt);
- gimple_assign_set_lhs (new_stmt, lhs);
+ lhs = make_ssa_name (TREE_TYPE (expr), NULL);
+ else
+ lhs = create_tmp_var (TREE_TYPE (expr), NULL);
+ new_stmt = gimple_build_assign (lhs, expr);
gimple_set_vuse (new_stmt, gimple_vuse (stmt));
gimple_set_vdef (new_stmt, gimple_vdef (stmt));
move_ssa_defining_stmt_for_defs (new_stmt, stmt);
OP1 or OP2. Returns the new statement. */
static gimple
-build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
+build_and_add_sum (tree type, tree op1, tree op2, enum tree_code opcode)
{
gimple op1def = NULL, op2def = NULL;
gimple_stmt_iterator gsi;
gimple sum;
/* Create the addition statement. */
- sum = gimple_build_assign_with_ops (opcode, tmpvar, op1, op2);
- op = make_ssa_name (tmpvar, sum);
- gimple_assign_set_lhs (sum, op);
+ op = make_ssa_name (type, NULL);
+ sum = gimple_build_assign_with_ops (opcode, op, op1, op2);
/* Find an insertion place and insert. */
if (TREE_CODE (op1) == SSA_NAME)
if (nr_candidates2 >= 2)
{
operand_entry_t oe1, oe2;
- tree tmpvar;
gimple prod;
int first = sbitmap_first_set_bit (candidates2);
fprintf (dump_file, "Building (");
print_generic_expr (dump_file, oe1->op, 0);
}
- tmpvar = create_tmp_reg (TREE_TYPE (oe1->op), NULL);
zero_one_operation (&oe1->op, c->oecode, c->op);
EXECUTE_IF_SET_IN_SBITMAP (candidates2, first+1, i, sbi0)
{
print_generic_expr (dump_file, oe2->op, 0);
}
zero_one_operation (&oe2->op, c->oecode, c->op);
- sum = build_and_add_sum (tmpvar, oe1->op, oe2->op, opcode);
+ sum = build_and_add_sum (TREE_TYPE (oe1->op),
+ oe1->op, oe2->op, opcode);
oe2->op = build_zero_cst (TREE_TYPE (oe2->op));
oe2->rank = 0;
oe1->op = gimple_get_lhs (sum);
}
/* Apply the multiplication/division. */
- prod = build_and_add_sum (tmpvar, oe1->op, c->op, c->oecode);
+ prod = build_and_add_sum (TREE_TYPE (oe1->op),
+ oe1->op, c->op, c->oecode);
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, ") %s ", c->oecode == MULT_EXPR ? "*" : "/");
}
else if (!operand_equal_p (t, curr->op, 0))
{
- tree tmpvar;
gimple sum;
enum tree_code subcode;
tree newop1;
tree newop2;
gcc_assert (COMPARISON_CLASS_P (t));
- tmpvar = create_tmp_var (TREE_TYPE (t), NULL);
extract_ops_from_tree (t, &subcode, &newop1, &newop2);
STRIP_USELESS_TYPE_CONVERSION (newop1);
STRIP_USELESS_TYPE_CONVERSION (newop2);
gcc_checking_assert (is_gimple_val (newop1)
&& is_gimple_val (newop2));
- sum = build_and_add_sum (tmpvar, newop1, newop2, subcode);
+ sum = build_and_add_sum (TREE_TYPE (t), newop1, newop2, subcode);
curr->op = gimple_get_lhs (sum);
}
return true;
int ready_stmts_end = 0;
int i = 0;
tree last_rhs1 = gimple_assign_rhs1 (stmt);
- tree lhs_var;
/* We start expression rewriting from the top statements.
So, in this loop we create a full list of statements
for (i = stmt_num - 2; i >= 0; i--)
stmts[i] = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmts[i+1]));
- lhs_var = create_tmp_reg (TREE_TYPE (last_rhs1), NULL);
-
for (i = 0; i < stmt_num; i++)
{
tree op1, op2;
update_stmt (stmts[i]);
}
else
- stmts[i] = build_and_add_sum (lhs_var, op1, op2, opcode);
+ stmts[i] = build_and_add_sum (TREE_TYPE (last_rhs1), op1, op2, opcode);
if (dump_file && (dump_flags & TDF_DETAILS))
{
return rf2->rank - rf1->rank;
}
-/* Get a new SSA name for register variable *TARGET of type TYPE.
- If *TARGET is null or incompatible with TYPE, create the variable
- first. */
-
-static tree
-get_reassoc_pow_ssa_name (tree *target, tree type)
-{
- if (!*target || !types_compatible_p (type, TREE_TYPE (*target)))
- *target = create_tmp_reg (type, "reassocpow");
-
- return make_ssa_name (*target, NULL);
-}
-
/* Look for repeated operands in OPS in the multiply tree rooted at
STMT. Replace them with an optimal sequence of multiplies and powi
builtin calls, and remove the used operands from OPS. Return an
SSA name representing the value of the replacement sequence. */
static tree
-attempt_builtin_powi (gimple stmt, VEC(operand_entry_t, heap) **ops,
- tree *target)
+attempt_builtin_powi (gimple stmt, VEC(operand_entry_t, heap) **ops)
{
unsigned i, j, vec_len;
int ii;
}
else
{
- iter_result = get_reassoc_pow_ssa_name (target, type);
+ iter_result = make_temp_ssa_name (type, NULL, "reassocpow");
pow_stmt = gimple_build_call (powi_fndecl, 2, rf1->repr,
build_int_cst (integer_type_node,
power));
op1 = rf1->factor;
op2 = rf2->repr;
- target_ssa = get_reassoc_pow_ssa_name (target, type);
+ target_ssa = make_temp_ssa_name (type, NULL, "reassocpow");
mul_stmt = gimple_build_assign_with_ops (MULT_EXPR,
target_ssa,
op1, op2);
/* Form a call to __builtin_powi for the maximum product
just formed, raised to the power obtained earlier. */
rf1 = VEC_index (repeat_factor, repeat_factor_vec, j);
- iter_result = get_reassoc_pow_ssa_name (target, type);
+ iter_result = make_temp_ssa_name (type, NULL, "reassocpow");
pow_stmt = gimple_build_call (powi_fndecl, 2, rf1->repr,
build_int_cst (integer_type_node,
power));
form the product of this one and those others. */
if (result)
{
- tree new_result = get_reassoc_pow_ssa_name (target, type);
+ tree new_result = make_temp_ssa_name (type, NULL, "reassocpow");
mul_stmt = gimple_build_assign_with_ops (MULT_EXPR, new_result,
result, iter_result);
gimple_set_location (mul_stmt, gimple_location (stmt));
{
gimple_stmt_iterator gsi;
basic_block son;
- tree target = NULL_TREE;
for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi))
{
if (first_pass_instance
&& rhs_code == MULT_EXPR
&& flag_unsafe_math_optimizations)
- powi_result = attempt_builtin_powi (stmt, &ops, &target);
+ powi_result = attempt_builtin_powi (stmt, &ops);
/* If the operand vector is now empty, all operands were
consumed by the __builtin_powi optimization. */
{
gimple mul_stmt;
tree type = TREE_TYPE (gimple_get_lhs (stmt));
- tree target_ssa = get_reassoc_pow_ssa_name (&target,
- type);
+ tree target_ssa = make_temp_ssa_name (type, NULL,
+ "reassocpow");
gimple_set_lhs (stmt, target_ssa);
update_stmt (stmt);
mul_stmt = gimple_build_assign_with_ops (MULT_EXPR, lhs,
if (si->stmt)
{
gimple stmt = si->stmt, lenstmt;
- tree callee, lhs, lhs_var, fn, tem;
+ tree callee, lhs, fn, tem;
location_t loc;
gimple_stmt_iterator gsi;
gsi = gsi_for_stmt (stmt);
fn = builtin_decl_implicit (BUILT_IN_STRLEN);
gcc_assert (lhs == NULL_TREE);
- lhs_var = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL);
tem = unshare_expr (gimple_call_arg (stmt, 0));
lenstmt = gimple_build_call (fn, 1, tem);
- lhs = make_ssa_name (lhs_var, lenstmt);
+ lhs = make_ssa_name (TREE_TYPE (TREE_TYPE (fn)), lenstmt);
gimple_call_set_lhs (lenstmt, lhs);
gimple_set_vuse (lenstmt, gimple_vuse (stmt));
gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);
- lhs_var = create_tmp_var (TREE_TYPE (gimple_call_arg (stmt, 0)),
- NULL);
tem = gimple_call_arg (stmt, 0);
if (!ptrofftype_p (TREE_TYPE (lhs)))
{
true, GSI_SAME_STMT);
}
lenstmt
- = gimple_build_assign_with_ops (POINTER_PLUS_EXPR,
- make_ssa_name (lhs_var, NULL),
- tem, lhs);
+ = gimple_build_assign_with_ops
+ (POINTER_PLUS_EXPR,
+ make_ssa_name (TREE_TYPE (gimple_call_arg (stmt, 0)), NULL),
+ tem, lhs);
gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);
gimple_call_set_arg (stmt, 0, gimple_assign_lhs (lenstmt));
lhs = NULL_TREE;
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
}
gimple_call_set_fndecl (stmt, fn);
- lhs_var = create_tmp_var (TREE_TYPE (TREE_TYPE (fn)), NULL);
- lhs = make_ssa_name (lhs_var, stmt);
+ lhs = make_ssa_name (TREE_TYPE (TREE_TYPE (fn)), stmt);
gimple_call_set_lhs (stmt, lhs);
update_stmt (stmt);
if (dump_file && (dump_flags & TDF_DETAILS) != 0)
}
/* csui = (1 << (word_mode) idx) */
- tmp = create_tmp_var (word_type_node, "csui");
- csui = make_ssa_name (tmp, NULL);
+ csui = make_ssa_name (word_type_node, NULL);
tmp = fold_build2 (LSHIFT_EXPR, word_type_node, word_mode_one,
fold_convert (word_type_node, idx));
tmp = force_gimple_operand_gsi (&gsi, tmp,
/*simple=*/false, NULL_TREE,
/*before=*/true, GSI_SAME_STMT);
shift_stmt = gimple_build_assign (csui, tmp);
- SSA_NAME_DEF_STMT (csui) = shift_stmt;
gsi_insert_before (&gsi, shift_stmt, GSI_SAME_STMT);
update_stmt (shift_stmt);
build_arrays (gimple swtch, struct switch_conv_info *info)
{
tree arr_index_type;
- tree tidx, sub, tmp, utype;
+ tree tidx, sub, utype;
gimple stmt;
gimple_stmt_iterator gsi;
int i;
utype = lang_hooks.types.type_for_mode (TYPE_MODE (utype), 1);
arr_index_type = build_index_type (info->range_size);
- tmp = create_tmp_var (utype, "csui");
- tidx = make_ssa_name (tmp, NULL);
+ tidx = make_ssa_name (utype, NULL);
sub = fold_build2_loc (loc, MINUS_EXPR, utype,
fold_convert_loc (loc, utype, info->index_expr),
fold_convert_loc (loc, utype, info->range_min));
sub = force_gimple_operand_gsi (&gsi, sub,
false, NULL, true, GSI_SAME_STMT);
stmt = gimple_build_assign (tidx, sub);
- SSA_NAME_DEF_STMT (tidx) = stmt;
gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
update_stmt (stmt);
{
tree ret_type = TREE_TYPE (DECL_RESULT (current_function_decl));
- tree tmp = create_tmp_reg (ret_type, label);
+ tree result = make_temp_ssa_name (ret_type, NULL, label);
gimple stmt;
- tree result;
if (types_compatible_p (TREE_TYPE (acc), TREE_TYPE (op1)))
- stmt = gimple_build_assign_with_ops (code, tmp, acc, op1);
+ stmt = gimple_build_assign_with_ops (code, result, acc, op1);
else
{
tree rhs = fold_convert (TREE_TYPE (acc),
op1));
rhs = force_gimple_operand_gsi (&gsi, rhs,
false, NULL, true, GSI_CONTINUE_LINKING);
- stmt = gimple_build_assign (NULL_TREE, rhs);
+ stmt = gimple_build_assign (result, rhs);
}
- result = make_ssa_name (tmp, stmt);
- gimple_assign_set_lhs (stmt, result);
- update_stmt (stmt);
gsi_insert_before (&gsi, stmt, GSI_NEW_STMT);
return result;
}
create_tailcall_accumulator (const char *label, basic_block bb, tree init)
{
tree ret_type = TREE_TYPE (DECL_RESULT (current_function_decl));
- tree tmp = create_tmp_reg (ret_type, label);
+ tree tmp = make_temp_ssa_name (ret_type, NULL, label);
gimple phi;
phi = create_phi_node (tmp, bb);
gimple_stmt_iterator *gsi,
VEC(tree,heap) **result_chain)
{
- tree perm_dest, vect1, vect2, high, low;
+ tree vect1, vect2, high, low;
gimple perm_stmt;
tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
tree perm_mask_low, perm_mask_high;
/* Create interleaving stmt:
high = VEC_PERM_EXPR <vect1, vect2, {0, nelt, 1, nelt+1, ...}> */
- perm_dest = create_tmp_reg (vectype, "vect_inter_high");
- high = make_ssa_name (perm_dest, NULL);
+ high = make_temp_ssa_name (vectype, NULL, "vect_inter_high");
perm_stmt
= gimple_build_assign_with_ops3 (VEC_PERM_EXPR, high,
vect1, vect2, perm_mask_high);
/* Create interleaving stmt:
low = VEC_PERM_EXPR <vect1, vect2, {nelt/2, nelt*3/2, nelt/2+1,
nelt*3/2+1, ...}> */
- perm_dest = create_tmp_reg (vectype, "vect_inter_low");
- low = make_ssa_name (perm_dest, NULL);
+ low = make_temp_ssa_name (vectype, NULL, "vect_inter_low");
perm_stmt
= gimple_build_assign_with_ops3 (VEC_PERM_EXPR, low,
vect1, vect2, perm_mask_low);
gimple_stmt_iterator *gsi,
VEC(tree,heap) **result_chain)
{
- tree perm_dest, data_ref, first_vect, second_vect;
+ tree data_ref, first_vect, second_vect;
tree perm_mask_even, perm_mask_odd;
gimple perm_stmt;
tree vectype = STMT_VINFO_VECTYPE (vinfo_for_stmt (stmt));
second_vect = VEC_index (tree, dr_chain, j+1);
/* data_ref = permute_even (first_data_ref, second_data_ref); */
- perm_dest = create_tmp_reg (vectype, "vect_perm_even");
-
- perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, perm_dest,
+ data_ref = make_temp_ssa_name (vectype, NULL, "vect_perm_even");
+ perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, data_ref,
first_vect, second_vect,
perm_mask_even);
-
- data_ref = make_ssa_name (perm_dest, perm_stmt);
- gimple_assign_set_lhs (perm_stmt, data_ref);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
-
VEC_replace (tree, *result_chain, j/2, data_ref);
/* data_ref = permute_odd (first_data_ref, second_data_ref); */
- perm_dest = create_tmp_reg (vectype, "vect_perm_odd");
-
- perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, perm_dest,
+ data_ref = make_temp_ssa_name (vectype, NULL, "vect_perm_odd");
+ perm_stmt = gimple_build_assign_with_ops3 (VEC_PERM_EXPR, data_ref,
first_vect, second_vect,
perm_mask_odd);
-
- data_ref = make_ssa_name (perm_dest, perm_stmt);
- gimple_assign_set_lhs (perm_stmt, data_ref);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);
-
VEC_replace (tree, *result_chain, j/2+length/2, data_ref);
}
dr_chain = VEC_copy (tree, heap, *result_chain);
((unsigned HOST_WIDE_INT) 1
<< shifts[i]) - 1);
cst = build_vector (type, vec);
- addend = create_tmp_reg (type, NULL);
- addend = make_ssa_name (addend, NULL);
+ addend = make_ssa_name (type, NULL);
stmt = gimple_build_assign_with_ops3 (VEC_COND_EXPR, addend,
cond, cst, zero);
gsi_insert_before (gsi, stmt, GSI_SAME_STMT);
tree int_ptrsize_type;
char tmp_name[20];
tree or_tmp_name = NULL_TREE;
- tree and_tmp, and_tmp_name;
+ tree and_tmp_name;
gimple and_stmt;
tree ptrsize_zero;
tree part_cond_expr;
{
gimple_seq new_stmt_list = NULL;
tree addr_base;
- tree addr_tmp, addr_tmp_name;
- tree or_tmp, new_or_tmp_name;
+ tree addr_tmp_name;
+ tree new_or_tmp_name;
gimple addr_stmt, or_stmt;
stmt_vec_info stmt_vinfo = vinfo_for_stmt (ref_stmt);
tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
if (new_stmt_list != NULL)
gimple_seq_add_seq (cond_expr_stmt_list, new_stmt_list);
- sprintf (tmp_name, "%s%d", "addr2int", i);
- addr_tmp = create_tmp_reg (int_ptrsize_type, tmp_name);
- addr_tmp_name = make_ssa_name (addr_tmp, NULL);
+ sprintf (tmp_name, "addr2int%d", i);
+ addr_tmp_name = make_temp_ssa_name (int_ptrsize_type, NULL, tmp_name);
addr_stmt = gimple_build_assign_with_ops (NOP_EXPR, addr_tmp_name,
addr_base, NULL_TREE);
- SSA_NAME_DEF_STMT (addr_tmp_name) = addr_stmt;
gimple_seq_add_stmt (cond_expr_stmt_list, addr_stmt);
/* The addresses are OR together. */
if (or_tmp_name != NULL_TREE)
{
/* create: or_tmp = or_tmp | addr_tmp */
- sprintf (tmp_name, "%s%d", "orptrs", i);
- or_tmp = create_tmp_reg (int_ptrsize_type, tmp_name);
- new_or_tmp_name = make_ssa_name (or_tmp, NULL);
+ sprintf (tmp_name, "orptrs%d", i);
+ new_or_tmp_name = make_temp_ssa_name (int_ptrsize_type, NULL, tmp_name);
or_stmt = gimple_build_assign_with_ops (BIT_IOR_EXPR,
new_or_tmp_name,
or_tmp_name, addr_tmp_name);
- SSA_NAME_DEF_STMT (new_or_tmp_name) = or_stmt;
gimple_seq_add_stmt (cond_expr_stmt_list, or_stmt);
or_tmp_name = new_or_tmp_name;
}
mask_cst = build_int_cst (int_ptrsize_type, mask);
/* create: and_tmp = or_tmp & mask */
- and_tmp = create_tmp_reg (int_ptrsize_type, "andmask" );
- and_tmp_name = make_ssa_name (and_tmp, NULL);
+ and_tmp_name = make_temp_ssa_name (int_ptrsize_type, NULL, "andmask");
and_stmt = gimple_build_assign_with_ops (BIT_AND_EXPR, and_tmp_name,
or_tmp_name, mask_cst);
- SSA_NAME_DEF_STMT (and_tmp_name) = and_stmt;
gimple_seq_add_stmt (cond_expr_stmt_list, and_stmt);
/* Make and_tmp the left operand of the conditional test against zero.
static tree
vect_recog_temp_ssa_var (tree type, gimple stmt)
{
- tree var = create_tmp_reg (type, "patt");
- var = make_ssa_name (var, stmt);
- return var;
+ return make_temp_ssa_name (type, stmt, "patt");
}
/* Function vect_recog_dot_prod_pattern
VEC (gimple, heap) **stmts, tree type,
tree *half_type, gimple def_stmt)
{
- tree new_type, new_oprnd, tmp;
+ tree new_type, new_oprnd;
gimple new_stmt;
if (code != MULT_EXPR && code != LSHIFT_EXPR)
{
/* Create a_T = (NEW_TYPE) a_t; */
*oprnd = gimple_assign_rhs1 (def_stmt);
- tmp = create_tmp_reg (new_type, NULL);
- new_oprnd = make_ssa_name (tmp, NULL);
+ new_oprnd = make_ssa_name (new_type, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, *oprnd,
NULL_TREE);
STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt;
{
enum tree_code code;
tree const_oprnd, oprnd;
- tree interm_type = NULL_TREE, half_type, tmp, new_oprnd, type;
+ tree interm_type = NULL_TREE, half_type, new_oprnd, type;
gimple def_stmt, new_stmt;
bool first = false;
bool promotion;
{
/* Create NEW_OPRND = (INTERM_TYPE) OPRND. */
oprnd = gimple_assign_rhs1 (def_stmt);
- tmp = create_tmp_reg (interm_type, NULL);
- new_oprnd = make_ssa_name (tmp, NULL);
+ new_oprnd = make_ssa_name (interm_type, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
oprnd, NULL_TREE);
STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt;
if (interm_type)
{
/* Create a type conversion HALF_TYPE->INTERM_TYPE. */
- tmp = create_tmp_reg (interm_type, NULL);
- new_oprnd = make_ssa_name (tmp, NULL);
+ new_oprnd = make_ssa_name (interm_type, NULL);
new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
oprnd, NULL_TREE);
oprnd = new_oprnd;
gimple stmt = VEC_pop (gimple, *stmts);
gimple pattern_stmt = NULL, new_def_stmt, prev_stmt = NULL, use_stmt = NULL;
tree op0, op1, vectype = NULL_TREE, use_lhs, use_type;
- tree var = NULL_TREE, new_type = NULL_TREE, tmp, new_oprnd;
+ tree var = NULL_TREE, new_type = NULL_TREE, new_oprnd;
bool first;
tree type = NULL;
|| TYPE_PRECISION (new_type) != TYPE_PRECISION (use_type))
{
/* Create NEW_TYPE->USE_TYPE conversion. */
- tmp = create_tmp_reg (use_type, NULL);
- new_oprnd = make_ssa_name (tmp, NULL);
+ new_oprnd = make_ssa_name (use_type, NULL);
pattern_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd,
var, NULL_TREE);
STMT_VINFO_RELATED_STMT (vinfo_for_stmt (use_stmt)) = pattern_stmt;
val = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (type), val);
else
{
- new_var = create_tmp_reg (TREE_TYPE (type), NULL);
+ new_temp = make_ssa_name (TREE_TYPE (type), NULL);
init_stmt = gimple_build_assign_with_ops (NOP_EXPR,
- new_var, val,
+ new_temp, val,
NULL_TREE);
- new_temp = make_ssa_name (new_var, init_stmt);
- gimple_assign_set_lhs (init_stmt, new_temp);
vect_init_vector_1 (stmt, init_stmt, gsi);
val = new_temp;
}
/* For A != B we substitute A ^ B. Either with conversion. */
else if (need_conversion)
{
- gimple newop;
- tree tem = create_tmp_reg (TREE_TYPE (op0), NULL);
- newop = gimple_build_assign_with_ops (BIT_XOR_EXPR, tem, op0, op1);
- tem = make_ssa_name (tem, newop);
- gimple_assign_set_lhs (newop, tem);
+ tree tem = make_ssa_name (TREE_TYPE (op0), NULL);
+ gimple newop = gimple_build_assign_with_ops (BIT_XOR_EXPR, tem, op0, op1);
gsi_insert_before (gsi, newop, GSI_SAME_STMT);
- update_stmt (newop);
gimple_assign_set_rhs_with_ops (gsi, NOP_EXPR, tem, NULL_TREE);
}
/* Or without. */
/* It works, insert a truncation or sign-change before the
float conversion. */
- tem = create_tmp_var (build_nonstandard_integer_type
+ tem = make_ssa_name (build_nonstandard_integer_type
(GET_MODE_PRECISION (mode), 0), NULL);
conv = gimple_build_assign_with_ops (NOP_EXPR, tem, rhs1, NULL_TREE);
- tem = make_ssa_name (tem, conv);
- gimple_assign_set_lhs (conv, tem);
gsi_insert_before (gsi, conv, GSI_SAME_STMT);
gimple_assign_set_rhs1 (stmt, tem);
update_stmt (stmt);
gcov_type all)
{
gimple stmt1, stmt2, stmt3;
- tree tmp0, tmp1, tmp2, tmpv;
+ tree tmp0, tmp1, tmp2;
gimple bb1end, bb2end, bb3end;
basic_block bb, bb2, bb3, bb4;
tree optype, op1, op2;
bb = gimple_bb (stmt);
gsi = gsi_for_stmt (stmt);
- tmpv = create_tmp_reg (optype, "PROF");
- tmp0 = make_ssa_name (tmpv, NULL);
- tmp1 = make_ssa_name (tmpv, NULL);
+ tmp0 = make_temp_ssa_name (optype, NULL, "PROF");
+ tmp1 = make_temp_ssa_name (optype, NULL, "PROF");
stmt1 = gimple_build_assign (tmp0, fold_convert (optype, value));
- SSA_NAME_DEF_STMT (tmp0) = stmt1;
stmt2 = gimple_build_assign (tmp1, op2);
- SSA_NAME_DEF_STMT (tmp1) = stmt2;
stmt3 = gimple_build_cond (NE_EXPR, tmp1, tmp0, NULL_TREE, NULL_TREE);
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (&gsi, stmt2, GSI_SAME_STMT);
gimple_mod_pow2 (gimple stmt, int prob, gcov_type count, gcov_type all)
{
gimple stmt1, stmt2, stmt3, stmt4;
- tree tmp2, tmp3, tmpv;
+ tree tmp2, tmp3;
gimple bb1end, bb2end, bb3end;
basic_block bb, bb2, bb3, bb4;
tree optype, op1, op2;
gsi = gsi_for_stmt (stmt);
result = create_tmp_reg (optype, "PROF");
- tmpv = create_tmp_var (optype, "PROF");
- tmp2 = make_ssa_name (tmpv, NULL);
- tmp3 = make_ssa_name (tmpv, NULL);
+ tmp2 = make_temp_ssa_name (optype, NULL, "PROF");
+ tmp3 = make_temp_ssa_name (optype, NULL, "PROF");
stmt2 = gimple_build_assign_with_ops (PLUS_EXPR, tmp2, op2,
build_int_cst (optype, -1));
- SSA_NAME_DEF_STMT (tmp2) = stmt2;
stmt3 = gimple_build_assign_with_ops (BIT_AND_EXPR, tmp3, tmp2, op2);
- SSA_NAME_DEF_STMT (tmp3) = stmt3;
stmt4 = gimple_build_cond (NE_EXPR, tmp3, build_int_cst (optype, 0),
NULL_TREE, NULL_TREE);
gsi_insert_before (&gsi, stmt2, GSI_SAME_STMT);
gsi = gsi_for_stmt (stmt);
result = create_tmp_reg (optype, "PROF");
- tmp1 = make_ssa_name (create_tmp_var (optype, "PROF"), NULL);
+ tmp1 = make_temp_ssa_name (optype, NULL, "PROF");
stmt1 = gimple_build_assign (result, op1);
stmt2 = gimple_build_assign (tmp1, op2);
- SSA_NAME_DEF_STMT (tmp1) = stmt2;
stmt3 = gimple_build_cond (LT_EXPR, result, tmp1, NULL_TREE, NULL_TREE);
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
gsi_insert_before (&gsi, stmt2, GSI_SAME_STMT);
int prob, gcov_type count, gcov_type all)
{
gimple dcall_stmt, load_stmt, cond_stmt;
- tree tmp0, tmp1, tmpv, tmp;
+ tree tmp0, tmp1, tmp;
basic_block cond_bb, dcall_bb, icall_bb, join_bb = NULL;
tree optype = build_pointer_type (void_type_node);
edge e_cd, e_ci, e_di, e_dj = NULL, e_ij;
cond_bb = gimple_bb (icall_stmt);
gsi = gsi_for_stmt (icall_stmt);
- tmpv = create_tmp_reg (optype, "PROF");
- tmp0 = make_ssa_name (tmpv, NULL);
- tmp1 = make_ssa_name (tmpv, NULL);
+ tmp0 = make_temp_ssa_name (optype, NULL, "PROF");
+ tmp1 = make_temp_ssa_name (optype, NULL, "PROF");
tmp = unshare_expr (gimple_call_fn (icall_stmt));
load_stmt = gimple_build_assign (tmp0, tmp);
- SSA_NAME_DEF_STMT (tmp0) = load_stmt;
gsi_insert_before (&gsi, load_stmt, GSI_SAME_STMT);
tmp = fold_convert (optype, build_addr (direct_call->symbol.decl,
current_function_decl));
load_stmt = gimple_build_assign (tmp1, tmp);
- SSA_NAME_DEF_STMT (tmp1) = load_stmt;
gsi_insert_before (&gsi, load_stmt, GSI_SAME_STMT);
cond_stmt = gimple_build_cond (EQ_EXPR, tmp1, tmp0, NULL_TREE, NULL_TREE);
gcov_type count, gcov_type all)
{
gimple tmp_stmt, cond_stmt, icall_stmt;
- tree tmp0, tmp1, tmpv, vcall_size, optype;
+ tree tmp0, tmp1, vcall_size, optype;
basic_block cond_bb, icall_bb, vcall_bb, join_bb;
edge e_ci, e_cv, e_iv, e_ij, e_vj;
gimple_stmt_iterator gsi;
vcall_size = gimple_call_arg (vcall_stmt, size_arg);
optype = TREE_TYPE (vcall_size);
- tmpv = create_tmp_var (optype, "PROF");
- tmp0 = make_ssa_name (tmpv, NULL);
- tmp1 = make_ssa_name (tmpv, NULL);
+ tmp0 = make_temp_ssa_name (optype, NULL, "PROF");
+ tmp1 = make_temp_ssa_name (optype, NULL, "PROF");
tmp_stmt = gimple_build_assign (tmp0, fold_convert (optype, icall_size));
- SSA_NAME_DEF_STMT (tmp0) = tmp_stmt;
gsi_insert_before (&gsi, tmp_stmt, GSI_SAME_STMT);
tmp_stmt = gimple_build_assign (tmp1, vcall_size);
- SSA_NAME_DEF_STMT (tmp1) = tmp_stmt;
gsi_insert_before (&gsi, tmp_stmt, GSI_SAME_STMT);
cond_stmt = gimple_build_cond (EQ_EXPR, tmp1, tmp0, NULL_TREE, NULL_TREE);