diff options
Diffstat (limited to 'gcc/tree-call-cdce.c')
-rw-r--r-- | gcc/tree-call-cdce.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c index 5f8930a0450..188a29553fa 100644 --- a/gcc/tree-call-cdce.c +++ b/gcc/tree-call-cdce.c @@ -184,7 +184,7 @@ check_target_format (tree arg) #define MAX_BASE_INT_BIT_SIZE 32 static bool -check_pow (gimple pow_call) +check_pow (gcall *pow_call) { tree base, expn; enum tree_code bc, ec; @@ -258,7 +258,7 @@ check_pow (gimple pow_call) Returns true if the function call is a candidate. */ static bool -check_builtin_call (gimple bcall) +check_builtin_call (gcall *bcall) { tree arg; @@ -271,7 +271,7 @@ check_builtin_call (gimple bcall) is a candidate. */ static bool -is_call_dce_candidate (gimple call) +is_call_dce_candidate (gcall *call) { tree fn; enum built_in_function fnc; @@ -342,7 +342,9 @@ gen_one_condition (tree arg, int lbub, { tree lbub_real_cst, lbub_cst, float_type; tree temp, tempn, tempc, tempcn; - gimple stmt1, stmt2, stmt3; + gassign *stmt1; + gassign *stmt2; + gcond *stmt3; float_type = TREE_TYPE (arg); lbub_cst = build_int_cst (integer_type_node, lbub); @@ -547,7 +549,7 @@ gen_conditions_for_pow_int_base (tree base, tree expn, and *NCONDS is the number of logical conditions. */ static void -gen_conditions_for_pow (gimple pow_call, vec<gimple> conds, +gen_conditions_for_pow (gcall *pow_call, vec<gimple> conds, unsigned *nconds) { tree base, expn; @@ -683,10 +685,10 @@ get_no_error_domain (enum built_in_function fnc) condition are separated by NULL tree in the vector. */ static void -gen_shrink_wrap_conditions (gimple bi_call, vec<gimple> conds, +gen_shrink_wrap_conditions (gcall *bi_call, vec<gimple> conds, unsigned int *nconds) { - gimple call; + gcall *call; tree fn; enum built_in_function fnc; @@ -724,7 +726,7 @@ gen_shrink_wrap_conditions (gimple bi_call, vec<gimple> conds, transformation actually happens. */ static bool -shrink_wrap_one_built_in_call (gimple bi_call) +shrink_wrap_one_built_in_call (gcall *bi_call) { gimple_stmt_iterator bi_call_bsi; basic_block bi_call_bb, join_tgt_bb, guard_bb, guard_bb0; @@ -859,7 +861,7 @@ shrink_wrap_one_built_in_call (gimple bi_call) wrapping transformation. */ static bool -shrink_wrap_conditional_dead_built_in_calls (vec<gimple> calls) +shrink_wrap_conditional_dead_built_in_calls (vec<gcall *> calls) { bool changed = false; unsigned i = 0; @@ -870,7 +872,7 @@ shrink_wrap_conditional_dead_built_in_calls (vec<gimple> calls) for (; i < n ; i++) { - gimple bi_call = calls[i]; + gcall *bi_call = calls[i]; changed |= shrink_wrap_one_built_in_call (bi_call); } @@ -919,15 +921,14 @@ pass_call_cdce::execute (function *fun) basic_block bb; gimple_stmt_iterator i; bool something_changed = false; - auto_vec<gimple> cond_dead_built_in_calls; + auto_vec<gcall *> cond_dead_built_in_calls; FOR_EACH_BB_FN (bb, fun) { /* Collect dead call candidates. */ for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) { - gimple stmt = gsi_stmt (i); - if (is_gimple_call (stmt) - && is_call_dce_candidate (stmt)) + gcall *stmt = dyn_cast <gcall *> (gsi_stmt (i)); + if (stmt && is_call_dce_candidate (stmt)) { if (dump_file && (dump_flags & TDF_DETAILS)) { |