2005-04-13 06:29:40 +02:00
|
|
|
/* Routines for discovering and unpropagating edge equivalences.
|
2007-07-26 10:37:01 +02:00
|
|
|
Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
This file is part of GCC.
|
|
|
|
|
|
|
|
GCC is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-26 10:37:01 +02:00
|
|
|
the Free Software Foundation; either version 3, or (at your option)
|
2005-04-13 06:29:40 +02:00
|
|
|
any later version.
|
|
|
|
|
|
|
|
GCC is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-07-26 10:37:01 +02:00
|
|
|
along with GCC; see the file COPYING3. If not see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include "system.h"
|
|
|
|
#include "coretypes.h"
|
|
|
|
#include "tm.h"
|
|
|
|
#include "tree.h"
|
|
|
|
#include "flags.h"
|
|
|
|
#include "rtl.h"
|
|
|
|
#include "tm_p.h"
|
|
|
|
#include "ggc.h"
|
|
|
|
#include "basic-block.h"
|
|
|
|
#include "output.h"
|
|
|
|
#include "expr.h"
|
|
|
|
#include "function.h"
|
|
|
|
#include "diagnostic.h"
|
|
|
|
#include "timevar.h"
|
|
|
|
#include "tree-dump.h"
|
|
|
|
#include "tree-flow.h"
|
|
|
|
#include "domwalk.h"
|
|
|
|
#include "real.h"
|
|
|
|
#include "tree-pass.h"
|
|
|
|
#include "tree-ssa-propagate.h"
|
|
|
|
#include "langhooks.h"
|
|
|
|
|
|
|
|
/* The basic structure describing an equivalency created by traversing
|
|
|
|
an edge. Traversing the edge effectively means that we can assume
|
|
|
|
that we've seen an assignment LHS = RHS. */
|
|
|
|
struct edge_equivalency
|
|
|
|
{
|
|
|
|
tree rhs;
|
|
|
|
tree lhs;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* This routine finds and records edge equivalences for every edge
|
|
|
|
in the CFG.
|
|
|
|
|
|
|
|
When complete, each edge that creates an equivalency will have an
|
|
|
|
EDGE_EQUIVALENCY structure hanging off the edge's AUX field.
|
|
|
|
The caller is responsible for freeing the AUX fields. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
associate_equivalences_with_edges (void)
|
|
|
|
{
|
|
|
|
basic_block bb;
|
|
|
|
|
|
|
|
/* Walk over each block. If the block ends with a control statement,
|
|
|
|
then it might create a useful equivalence. */
|
|
|
|
FOR_EACH_BB (bb)
|
|
|
|
{
|
|
|
|
block_stmt_iterator bsi = bsi_last (bb);
|
|
|
|
tree stmt;
|
|
|
|
|
|
|
|
/* If the block does not end with a COND_EXPR or SWITCH_EXPR
|
|
|
|
then there is nothing to do. */
|
|
|
|
if (bsi_end_p (bsi))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
stmt = bsi_stmt (bsi);
|
|
|
|
|
|
|
|
if (!stmt)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* A COND_EXPR may create an equivalency in a variety of different
|
|
|
|
ways. */
|
|
|
|
if (TREE_CODE (stmt) == COND_EXPR)
|
|
|
|
{
|
|
|
|
tree cond = COND_EXPR_COND (stmt);
|
|
|
|
edge true_edge;
|
|
|
|
edge false_edge;
|
|
|
|
struct edge_equivalency *equivalency;
|
|
|
|
|
|
|
|
extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
|
|
|
|
|
|
|
|
/* If the conditional is a single variable 'X', record 'X = 1'
|
|
|
|
for the true edge and 'X = 0' on the false edge. */
|
2005-11-30 09:53:22 +01:00
|
|
|
if (TREE_CODE (cond) == SSA_NAME
|
|
|
|
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond))
|
2005-04-13 06:29:40 +02:00
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->rhs = constant_boolean_node (1, TREE_TYPE (cond));
|
|
|
|
equivalency->lhs = cond;
|
|
|
|
true_edge->aux = equivalency;
|
|
|
|
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->rhs = constant_boolean_node (0, TREE_TYPE (cond));
|
|
|
|
equivalency->lhs = cond;
|
|
|
|
false_edge->aux = equivalency;
|
|
|
|
}
|
|
|
|
/* Equality tests may create one or two equivalences. */
|
|
|
|
else if (TREE_CODE (cond) == EQ_EXPR || TREE_CODE (cond) == NE_EXPR)
|
|
|
|
{
|
|
|
|
tree op0 = TREE_OPERAND (cond, 0);
|
|
|
|
tree op1 = TREE_OPERAND (cond, 1);
|
|
|
|
|
|
|
|
/* Special case comparing booleans against a constant as we
|
|
|
|
know the value of OP0 on both arms of the branch. i.e., we
|
|
|
|
can record an equivalence for OP0 rather than COND. */
|
|
|
|
if (TREE_CODE (op0) == SSA_NAME
|
2005-11-30 09:53:22 +01:00
|
|
|
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0)
|
2005-04-13 06:29:40 +02:00
|
|
|
&& TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE
|
|
|
|
&& is_gimple_min_invariant (op1))
|
|
|
|
{
|
|
|
|
if (TREE_CODE (cond) == EQ_EXPR)
|
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->lhs = op0;
|
|
|
|
equivalency->rhs = (integer_zerop (op1)
|
|
|
|
? boolean_false_node
|
|
|
|
: boolean_true_node);
|
|
|
|
true_edge->aux = equivalency;
|
|
|
|
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->lhs = op0;
|
|
|
|
equivalency->rhs = (integer_zerop (op1)
|
|
|
|
? boolean_true_node
|
|
|
|
: boolean_false_node);
|
|
|
|
false_edge->aux = equivalency;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->lhs = op0;
|
|
|
|
equivalency->rhs = (integer_zerop (op1)
|
|
|
|
? boolean_true_node
|
|
|
|
: boolean_false_node);
|
|
|
|
true_edge->aux = equivalency;
|
|
|
|
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->lhs = op0;
|
|
|
|
equivalency->rhs = (integer_zerop (op1)
|
|
|
|
? boolean_false_node
|
|
|
|
: boolean_true_node);
|
|
|
|
false_edge->aux = equivalency;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (TREE_CODE (op0) == SSA_NAME
|
2005-11-30 09:53:22 +01:00
|
|
|
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0)
|
2005-04-13 06:29:40 +02:00
|
|
|
&& (is_gimple_min_invariant (op1)
|
2005-11-30 09:53:22 +01:00
|
|
|
|| (TREE_CODE (op1) == SSA_NAME
|
|
|
|
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op1))))
|
2005-04-13 06:29:40 +02:00
|
|
|
{
|
|
|
|
/* For IEEE, -0.0 == 0.0, so we don't necessarily know
|
|
|
|
the sign of a variable compared against zero. If
|
|
|
|
we're honoring signed zeros, then we cannot record
|
|
|
|
this value unless we know that the value is nonzero. */
|
|
|
|
if (HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (op0)))
|
|
|
|
&& (TREE_CODE (op1) != REAL_CST
|
|
|
|
|| REAL_VALUES_EQUAL (dconst0, TREE_REAL_CST (op1))))
|
|
|
|
continue;
|
|
|
|
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->lhs = op0;
|
|
|
|
equivalency->rhs = op1;
|
|
|
|
if (TREE_CODE (cond) == EQ_EXPR)
|
|
|
|
true_edge->aux = equivalency;
|
|
|
|
else
|
|
|
|
false_edge->aux = equivalency;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ??? TRUTH_NOT_EXPR can create an equivalence too. */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* For a SWITCH_EXPR, a case label which represents a single
|
|
|
|
value and which is the only case label which reaches the
|
|
|
|
target block creates an equivalence. */
|
|
|
|
if (TREE_CODE (stmt) == SWITCH_EXPR)
|
|
|
|
{
|
|
|
|
tree cond = SWITCH_COND (stmt);
|
|
|
|
|
2005-11-30 09:53:22 +01:00
|
|
|
if (TREE_CODE (cond) == SSA_NAME
|
|
|
|
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond))
|
2005-04-13 06:29:40 +02:00
|
|
|
{
|
|
|
|
tree labels = SWITCH_LABELS (stmt);
|
|
|
|
int i, n_labels = TREE_VEC_LENGTH (labels);
|
2005-12-18 10:26:53 +01:00
|
|
|
tree *info = XCNEWVEC (tree, n_basic_blocks);
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
/* Walk over the case label vector. Record blocks
|
|
|
|
which are reached by a single case label which represents
|
|
|
|
a single value. */
|
|
|
|
for (i = 0; i < n_labels; i++)
|
|
|
|
{
|
|
|
|
tree label = TREE_VEC_ELT (labels, i);
|
|
|
|
basic_block bb = label_to_block (CASE_LABEL (label));
|
|
|
|
|
|
|
|
|
|
|
|
if (CASE_HIGH (label)
|
|
|
|
|| !CASE_LOW (label)
|
|
|
|
|| info[bb->index])
|
|
|
|
info[bb->index] = error_mark_node;
|
|
|
|
else
|
|
|
|
info[bb->index] = label;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Now walk over the blocks to determine which ones were
|
|
|
|
marked as being reached by a useful case label. */
|
|
|
|
for (i = 0; i < n_basic_blocks; i++)
|
|
|
|
{
|
|
|
|
tree node = info[i];
|
|
|
|
|
|
|
|
if (node != NULL
|
|
|
|
&& node != error_mark_node)
|
|
|
|
{
|
|
|
|
tree x = fold_convert (TREE_TYPE (cond), CASE_LOW (node));
|
|
|
|
struct edge_equivalency *equivalency;
|
|
|
|
|
|
|
|
/* Record an equivalency on the edge from BB to basic
|
|
|
|
block I. */
|
2005-12-18 10:26:53 +01:00
|
|
|
equivalency = XNEW (struct edge_equivalency);
|
2005-04-13 06:29:40 +02:00
|
|
|
equivalency->rhs = x;
|
|
|
|
equivalency->lhs = cond;
|
|
|
|
find_edge (bb, BASIC_BLOCK (i))->aux = equivalency;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free (info);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Translating out of SSA sometimes requires inserting copies and
|
|
|
|
constant initializations on edges to eliminate PHI nodes.
|
|
|
|
|
|
|
|
In some cases those copies and constant initializations are
|
|
|
|
redundant because the target already has the value on the
|
|
|
|
RHS of the assignment.
|
|
|
|
|
|
|
|
We previously tried to catch these cases after translating
|
|
|
|
out of SSA form. However, that code often missed cases. Worse
|
|
|
|
yet, the cases it missed were also often missed by the RTL
|
|
|
|
optimizers. Thus the resulting code had redundant instructions.
|
|
|
|
|
|
|
|
This pass attempts to detect these situations before translating
|
|
|
|
out of SSA form.
|
|
|
|
|
|
|
|
The key concept that this pass is built upon is that these
|
|
|
|
redundant copies and constant initializations often occur
|
|
|
|
due to constant/copy propagating equivalences resulting from
|
|
|
|
COND_EXPRs and SWITCH_EXPRs.
|
|
|
|
|
|
|
|
We want to do those propagations as they can sometimes allow
|
2005-04-13 16:34:13 +02:00
|
|
|
the SSA optimizers to do a better job. However, in the cases
|
2005-04-13 06:29:40 +02:00
|
|
|
where such propagations do not result in further optimization,
|
|
|
|
we would like to "undo" the propagation to avoid the redundant
|
|
|
|
copies and constant initializations.
|
|
|
|
|
|
|
|
This pass works by first associating equivalences with edges in
|
|
|
|
the CFG. For example, the edge leading from a SWITCH_EXPR to
|
|
|
|
its associated CASE_LABEL will have an equivalency between
|
|
|
|
SWITCH_COND and the value in the case label.
|
|
|
|
|
|
|
|
Once we have found the edge equivalences, we proceed to walk
|
|
|
|
the CFG in dominator order. As we traverse edges we record
|
|
|
|
equivalences associated with those edges we traverse.
|
|
|
|
|
|
|
|
When we encounter a PHI node, we walk its arguments to see if we
|
|
|
|
have an equivalence for the PHI argument. If so, then we replace
|
|
|
|
the argument.
|
|
|
|
|
|
|
|
Equivalences are looked up based on their value (think of it as
|
|
|
|
the RHS of an assignment). A value may be an SSA_NAME or an
|
|
|
|
invariant. We may have several SSA_NAMEs with the same value,
|
|
|
|
so with each value we have a list of SSA_NAMEs that have the
|
|
|
|
same value. */
|
|
|
|
|
|
|
|
/* As we enter each block we record the value for any edge equivalency
|
|
|
|
leading to this block. If no such edge equivalency exists, then we
|
|
|
|
record NULL. These equivalences are live until we leave the dominator
|
|
|
|
subtree rooted at the block where we record the equivalency. */
|
2005-04-25 01:23:33 +02:00
|
|
|
static VEC(tree,heap) *equiv_stack;
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
/* Global hash table implementing a mapping from invariant values
|
|
|
|
to a list of SSA_NAMEs which have the same value. We might be
|
|
|
|
able to reuse tree-vn for this code. */
|
|
|
|
static htab_t equiv;
|
|
|
|
|
|
|
|
/* Main structure for recording equivalences into our hash table. */
|
|
|
|
struct equiv_hash_elt
|
|
|
|
{
|
|
|
|
/* The value/key of this entry. */
|
|
|
|
tree value;
|
|
|
|
|
|
|
|
/* List of SSA_NAMEs which have the same value/key. */
|
2005-05-02 18:47:03 +02:00
|
|
|
VEC(tree,heap) *equivalences;
|
2005-04-13 06:29:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static void uncprop_initialize_block (struct dom_walk_data *, basic_block);
|
|
|
|
static void uncprop_finalize_block (struct dom_walk_data *, basic_block);
|
|
|
|
static void uncprop_into_successor_phis (struct dom_walk_data *, basic_block);
|
|
|
|
|
|
|
|
/* Hashing and equality routines for the hash table. */
|
|
|
|
|
|
|
|
static hashval_t
|
|
|
|
equiv_hash (const void *p)
|
|
|
|
{
|
c-common.c (fname_as_string, [...]): Constify.
* c-common.c (fname_as_string, c_type_hash): Constify.
* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
* cgraph.c (edge_hash, edge_eq): Likewise.
* dwarf2out.c (decl_die_table_eq, decl_loc_table_eq): Likewise.
* emit-rtl.c (mem_attrs_htab_eq, reg_attrs_htab_hash,
reg_attrs_htab_eq): Likewise.
* except.c (t2r_eq, t2r_hash, ttypes_filter_eq, ehl_hash, ehl_eq):
Likewise.
* genautomata.c (const_reserv_sets_t, const_unit_decl_t,
const_decl_t, const_state_t, const_automata_list_el_t): New.
(first_out_arc, DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL,
DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV,
automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash,
insn_decl_eq_p, decl_hash, decl_eq_p, alt_state_cmp,
reserv_sets_cmp, reserv_sets_eq, state_hash, state_eq_p,
automata_list_hash, automata_list_eq_p, compare_states_for_equiv,
compare_max_occ_cycle_nums, out_state_arcs_num,
compare_transition_els_num, units_cmp, state_reservs_cmp):
Constify.
* genmodes.c (cmp_modes): Likewise.
* ggc-common.c (saving_htab_hash, saving_htab_eq): Likewise.
* gimplify.c (compare_case_labels): Likewise.
* ipa-type-escape.c (get_name_of_type, type_brand_s): Likewise.
* loop-unroll.c (si_info_hash, ve_info_hash): Likewise.
* matrix-reorg.c (mtt_info_hash): Likewise.
* postreload-gcse.c (hash_expr_for_htab, expr_equiv_p): Likewise.
* rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New.
(htab_hash_bucket, htab_hash_elem): Constify.
* tree-browser.c (TB_parent_eq): Likewise.
* tree-scalar-evolution.c (hash_scev_info): Likewise.
* tree-ssa-alias.c (sort_tags_by_id): Likewise.
* tree-ssa-coalesce.c (const_coalesce_pair_p): New.
(coalesce_pair_map_hash, coalesce_pair_map_eq, compare_pairs):
Constify.
* tree-ssa-dom.c (avail_expr_hash, avail_expr_eq): Likewise.
* tree-ssa-pre.c (const_expr_pred_trans_t): New.
(expr_pred_trans_hash, expr_pred_trans_eq): Constify.
* tree-ssa-sccvn.c (const_vn_binary_op_t, const_vn_unary_op_t,
const_vn_phi_t, const_vn_reference_op_t, const_vn_reference_t):
New.
(vn_reference_op_eq, vn_reference_hash, vn_reference_eq,
vn_unary_op_hash, vn_unary_op_eq, vn_binary_op_hash,
vn_binary_op_eq, vn_phi_hash, vn_phi_eq): Constify.
* tree-ssa-threadupdate.c (redirection_data_hash,
redirection_data_eq): Likewise.
* tree-ssa-uncprop.c (equiv_hash, equiv_eq): Likewise.
* tree-ssa.c (var_ann_eq): Likewise.
* tree-vrp.c (compare_case_labels): Likewise.
* tree.c (int_cst_hash_hash, int_cst_hash_eq,
tree_map_base_marked_p, type_hash_marked_p, tree_check_failed,
tree_not_check_failed, tree_class_check_failed,
tree_range_check_failed, tree_not_class_check_failed,
omp_clause_check_failed, omp_clause_range_check_failed,
tree_contains_struct_check_failed, tree_operand_check_failed):
Likewise.
* tree.h (tree_contains_struct_check_failed, tree_check_failed,
tree_not_check_failed, tree_class_check_failed,
tree_range_check_failed, tree_not_class_check_failed,
tree_operand_check_failed, omp_clause_operand_check_failed,
tree_operand_length): Likewise.
* var-tracking.c (const_variable): New.
(variable_htab_hash, variable_htab_eq): Constify.
* varasm.c (const_desc_hash): Likewise.
cp:
* decl.c (typename_hash, typename_compare): Constify.
* mangle.c (hash_type, compare_type): Likewise.
* pt.c (eq_local_specializations, hash_local_specialization):
Likewise.
* tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
list_hash): Likewise.
* typeck2.c (pat_compare): Likewise.
fortran:
* gfortran.h (generate_isocbinding_symbol): Constify.
* symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
generate_isocbinding_symbol): Likewise.
java:
* class.c (java_treetreehash_hash, java_treetreehash_compare):
Constify.
* expr.c (type_assertion_eq): Likewise.
* jcf-io.c (compare_path): Likewise.
* jcf-parse.c (cmpstringp): Likewise.
* verify-impl.c (get_one_type, compute_argument_types,
compute_return_type): Likewise.
objc:
* objc-act.c (volatilized_hash, volatilized_eq, string_hash,
string_eq): Constify.
From-SVN: r126925
2007-07-25 21:06:06 +02:00
|
|
|
tree const value = ((const struct equiv_hash_elt *)p)->value;
|
2005-04-13 06:29:40 +02:00
|
|
|
return iterative_hash_expr (value, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
equiv_eq (const void *p1, const void *p2)
|
|
|
|
{
|
c-common.c (fname_as_string, [...]): Constify.
* c-common.c (fname_as_string, c_type_hash): Constify.
* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
* cgraph.c (edge_hash, edge_eq): Likewise.
* dwarf2out.c (decl_die_table_eq, decl_loc_table_eq): Likewise.
* emit-rtl.c (mem_attrs_htab_eq, reg_attrs_htab_hash,
reg_attrs_htab_eq): Likewise.
* except.c (t2r_eq, t2r_hash, ttypes_filter_eq, ehl_hash, ehl_eq):
Likewise.
* genautomata.c (const_reserv_sets_t, const_unit_decl_t,
const_decl_t, const_state_t, const_automata_list_el_t): New.
(first_out_arc, DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL,
DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV,
automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash,
insn_decl_eq_p, decl_hash, decl_eq_p, alt_state_cmp,
reserv_sets_cmp, reserv_sets_eq, state_hash, state_eq_p,
automata_list_hash, automata_list_eq_p, compare_states_for_equiv,
compare_max_occ_cycle_nums, out_state_arcs_num,
compare_transition_els_num, units_cmp, state_reservs_cmp):
Constify.
* genmodes.c (cmp_modes): Likewise.
* ggc-common.c (saving_htab_hash, saving_htab_eq): Likewise.
* gimplify.c (compare_case_labels): Likewise.
* ipa-type-escape.c (get_name_of_type, type_brand_s): Likewise.
* loop-unroll.c (si_info_hash, ve_info_hash): Likewise.
* matrix-reorg.c (mtt_info_hash): Likewise.
* postreload-gcse.c (hash_expr_for_htab, expr_equiv_p): Likewise.
* rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New.
(htab_hash_bucket, htab_hash_elem): Constify.
* tree-browser.c (TB_parent_eq): Likewise.
* tree-scalar-evolution.c (hash_scev_info): Likewise.
* tree-ssa-alias.c (sort_tags_by_id): Likewise.
* tree-ssa-coalesce.c (const_coalesce_pair_p): New.
(coalesce_pair_map_hash, coalesce_pair_map_eq, compare_pairs):
Constify.
* tree-ssa-dom.c (avail_expr_hash, avail_expr_eq): Likewise.
* tree-ssa-pre.c (const_expr_pred_trans_t): New.
(expr_pred_trans_hash, expr_pred_trans_eq): Constify.
* tree-ssa-sccvn.c (const_vn_binary_op_t, const_vn_unary_op_t,
const_vn_phi_t, const_vn_reference_op_t, const_vn_reference_t):
New.
(vn_reference_op_eq, vn_reference_hash, vn_reference_eq,
vn_unary_op_hash, vn_unary_op_eq, vn_binary_op_hash,
vn_binary_op_eq, vn_phi_hash, vn_phi_eq): Constify.
* tree-ssa-threadupdate.c (redirection_data_hash,
redirection_data_eq): Likewise.
* tree-ssa-uncprop.c (equiv_hash, equiv_eq): Likewise.
* tree-ssa.c (var_ann_eq): Likewise.
* tree-vrp.c (compare_case_labels): Likewise.
* tree.c (int_cst_hash_hash, int_cst_hash_eq,
tree_map_base_marked_p, type_hash_marked_p, tree_check_failed,
tree_not_check_failed, tree_class_check_failed,
tree_range_check_failed, tree_not_class_check_failed,
omp_clause_check_failed, omp_clause_range_check_failed,
tree_contains_struct_check_failed, tree_operand_check_failed):
Likewise.
* tree.h (tree_contains_struct_check_failed, tree_check_failed,
tree_not_check_failed, tree_class_check_failed,
tree_range_check_failed, tree_not_class_check_failed,
tree_operand_check_failed, omp_clause_operand_check_failed,
tree_operand_length): Likewise.
* var-tracking.c (const_variable): New.
(variable_htab_hash, variable_htab_eq): Constify.
* varasm.c (const_desc_hash): Likewise.
cp:
* decl.c (typename_hash, typename_compare): Constify.
* mangle.c (hash_type, compare_type): Likewise.
* pt.c (eq_local_specializations, hash_local_specialization):
Likewise.
* tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
list_hash): Likewise.
* typeck2.c (pat_compare): Likewise.
fortran:
* gfortran.h (generate_isocbinding_symbol): Constify.
* symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
generate_isocbinding_symbol): Likewise.
java:
* class.c (java_treetreehash_hash, java_treetreehash_compare):
Constify.
* expr.c (type_assertion_eq): Likewise.
* jcf-io.c (compare_path): Likewise.
* jcf-parse.c (cmpstringp): Likewise.
* verify-impl.c (get_one_type, compute_argument_types,
compute_return_type): Likewise.
objc:
* objc-act.c (volatilized_hash, volatilized_eq, string_hash,
string_eq): Constify.
From-SVN: r126925
2007-07-25 21:06:06 +02:00
|
|
|
tree value1 = ((const struct equiv_hash_elt *)p1)->value;
|
|
|
|
tree value2 = ((const struct equiv_hash_elt *)p2)->value;
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
return operand_equal_p (value1, value2, 0);
|
|
|
|
}
|
|
|
|
|
2005-05-02 18:47:03 +02:00
|
|
|
/* Free an instance of equiv_hash_elt. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
equiv_free (void *p)
|
|
|
|
{
|
|
|
|
struct equiv_hash_elt *elt = (struct equiv_hash_elt *) p;
|
|
|
|
VEC_free (tree, heap, elt->equivalences);
|
|
|
|
free (elt);
|
|
|
|
}
|
|
|
|
|
2005-04-13 06:29:40 +02:00
|
|
|
/* Remove the most recently recorded equivalency for VALUE. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
remove_equivalence (tree value)
|
|
|
|
{
|
|
|
|
struct equiv_hash_elt equiv_hash_elt, *equiv_hash_elt_p;
|
|
|
|
void **slot;
|
|
|
|
|
|
|
|
equiv_hash_elt.value = value;
|
|
|
|
equiv_hash_elt.equivalences = NULL;
|
|
|
|
|
|
|
|
slot = htab_find_slot (equiv, &equiv_hash_elt, NO_INSERT);
|
|
|
|
|
|
|
|
equiv_hash_elt_p = (struct equiv_hash_elt *) *slot;
|
2005-05-02 18:47:03 +02:00
|
|
|
VEC_pop (tree, equiv_hash_elt_p->equivalences);
|
2005-04-13 06:29:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Record EQUIVALENCE = VALUE into our hash table. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
record_equiv (tree value, tree equivalence)
|
|
|
|
{
|
|
|
|
struct equiv_hash_elt *equiv_hash_elt;
|
|
|
|
void **slot;
|
|
|
|
|
2005-12-18 10:26:53 +01:00
|
|
|
equiv_hash_elt = XNEW (struct equiv_hash_elt);
|
2005-04-13 06:29:40 +02:00
|
|
|
equiv_hash_elt->value = value;
|
|
|
|
equiv_hash_elt->equivalences = NULL;
|
|
|
|
|
|
|
|
slot = htab_find_slot (equiv, equiv_hash_elt, INSERT);
|
|
|
|
|
|
|
|
if (*slot == NULL)
|
|
|
|
*slot = (void *) equiv_hash_elt;
|
|
|
|
else
|
|
|
|
free (equiv_hash_elt);
|
|
|
|
|
|
|
|
equiv_hash_elt = (struct equiv_hash_elt *) *slot;
|
|
|
|
|
2005-05-02 18:47:03 +02:00
|
|
|
VEC_safe_push (tree, heap, equiv_hash_elt->equivalences, equivalence);
|
2005-04-13 06:29:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Main driver for un-cprop. */
|
|
|
|
|
2006-03-02 20:00:11 +01:00
|
|
|
static unsigned int
|
2005-04-13 06:29:40 +02:00
|
|
|
tree_ssa_uncprop (void)
|
|
|
|
{
|
|
|
|
struct dom_walk_data walk_data;
|
|
|
|
basic_block bb;
|
|
|
|
|
|
|
|
associate_equivalences_with_edges ();
|
|
|
|
|
|
|
|
/* Create our global data structures. */
|
2005-05-02 18:47:03 +02:00
|
|
|
equiv = htab_create (1024, equiv_hash, equiv_eq, equiv_free);
|
2005-04-25 01:23:33 +02:00
|
|
|
equiv_stack = VEC_alloc (tree, heap, 2);
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
/* We're going to do a dominator walk, so ensure that we have
|
|
|
|
dominance information. */
|
|
|
|
calculate_dominance_info (CDI_DOMINATORS);
|
|
|
|
|
|
|
|
/* Setup callbacks for the generic dominator tree walker. */
|
|
|
|
walk_data.walk_stmts_backward = false;
|
|
|
|
walk_data.dom_direction = CDI_DOMINATORS;
|
|
|
|
walk_data.initialize_block_local_data = NULL;
|
|
|
|
walk_data.before_dom_children_before_stmts = uncprop_initialize_block;
|
|
|
|
walk_data.before_dom_children_walk_stmts = NULL;
|
|
|
|
walk_data.before_dom_children_after_stmts = uncprop_into_successor_phis;
|
|
|
|
walk_data.after_dom_children_before_stmts = NULL;
|
|
|
|
walk_data.after_dom_children_walk_stmts = NULL;
|
|
|
|
walk_data.after_dom_children_after_stmts = uncprop_finalize_block;
|
|
|
|
walk_data.global_data = NULL;
|
|
|
|
walk_data.block_local_data_size = 0;
|
|
|
|
walk_data.interesting_blocks = NULL;
|
|
|
|
|
|
|
|
/* Now initialize the dominator walker. */
|
|
|
|
init_walk_dominator_tree (&walk_data);
|
|
|
|
|
|
|
|
/* Recursively walk the dominator tree undoing unprofitable
|
|
|
|
constant/copy propagations. */
|
|
|
|
walk_dominator_tree (&walk_data, ENTRY_BLOCK_PTR);
|
|
|
|
|
|
|
|
/* Finalize and clean up. */
|
|
|
|
fini_walk_dominator_tree (&walk_data);
|
|
|
|
|
2005-04-25 01:23:33 +02:00
|
|
|
/* EQUIV_STACK should already be empty at this point, so we just
|
|
|
|
need to empty elements out of the hash table, free EQUIV_STACK,
|
|
|
|
and cleanup the AUX field on the edges. */
|
2005-04-13 06:29:40 +02:00
|
|
|
htab_delete (equiv);
|
2005-04-25 01:23:33 +02:00
|
|
|
VEC_free (tree, heap, equiv_stack);
|
2005-04-13 06:29:40 +02:00
|
|
|
FOR_EACH_BB (bb)
|
|
|
|
{
|
|
|
|
edge e;
|
|
|
|
edge_iterator ei;
|
|
|
|
|
|
|
|
FOR_EACH_EDGE (e, ei, bb->succs)
|
|
|
|
{
|
|
|
|
if (e->aux)
|
|
|
|
{
|
|
|
|
free (e->aux);
|
|
|
|
e->aux = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-03-02 20:00:11 +01:00
|
|
|
return 0;
|
2005-04-13 06:29:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* We have finished processing the dominator children of BB, perform
|
|
|
|
any finalization actions in preparation for leaving this node in
|
|
|
|
the dominator tree. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
uncprop_finalize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
|
|
|
|
basic_block bb ATTRIBUTE_UNUSED)
|
|
|
|
{
|
|
|
|
/* Pop the topmost value off the equiv stack. */
|
2005-04-25 01:23:33 +02:00
|
|
|
tree value = VEC_pop (tree, equiv_stack);
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
/* If that value was non-null, then pop the topmost equivalency off
|
|
|
|
its equivalency stack. */
|
|
|
|
if (value != NULL)
|
|
|
|
remove_equivalence (value);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Unpropagate values from PHI nodes in successor blocks of BB. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
uncprop_into_successor_phis (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
|
|
|
|
basic_block bb)
|
|
|
|
{
|
|
|
|
edge e;
|
|
|
|
edge_iterator ei;
|
|
|
|
|
|
|
|
/* For each successor edge, first temporarily record any equivalence
|
|
|
|
on that edge. Then unpropagate values in any PHI nodes at the
|
|
|
|
destination of the edge. Then remove the temporary equivalence. */
|
|
|
|
FOR_EACH_EDGE (e, ei, bb->succs)
|
|
|
|
{
|
|
|
|
tree phi = phi_nodes (e->dest);
|
|
|
|
|
|
|
|
/* If there are no PHI nodes in this destination, then there is
|
|
|
|
no sense in recording any equivalences. */
|
|
|
|
if (!phi)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Record any equivalency associated with E. */
|
|
|
|
if (e->aux)
|
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
struct edge_equivalency *equiv = (struct edge_equivalency *) e->aux;
|
2005-04-13 06:29:40 +02:00
|
|
|
record_equiv (equiv->rhs, equiv->lhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Walk over the PHI nodes, unpropagating values. */
|
|
|
|
for ( ; phi; phi = PHI_CHAIN (phi))
|
|
|
|
{
|
|
|
|
/* Sigh. We'll have more efficient access to this one day. */
|
|
|
|
tree arg = PHI_ARG_DEF (phi, e->dest_idx);
|
|
|
|
struct equiv_hash_elt equiv_hash_elt;
|
|
|
|
void **slot;
|
|
|
|
|
|
|
|
/* If the argument is not an invariant, or refers to the same
|
|
|
|
underlying variable as the PHI result, then there's no
|
|
|
|
point in un-propagating the argument. */
|
|
|
|
if (!is_gimple_min_invariant (arg)
|
|
|
|
&& SSA_NAME_VAR (arg) != SSA_NAME_VAR (PHI_RESULT (phi)))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Lookup this argument's value in the hash table. */
|
|
|
|
equiv_hash_elt.value = arg;
|
|
|
|
equiv_hash_elt.equivalences = NULL;
|
|
|
|
slot = htab_find_slot (equiv, &equiv_hash_elt, NO_INSERT);
|
|
|
|
|
|
|
|
if (slot)
|
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
struct equiv_hash_elt *elt = (struct equiv_hash_elt *) *slot;
|
2005-04-13 06:29:40 +02:00
|
|
|
int j;
|
|
|
|
|
|
|
|
/* Walk every equivalence with the same value. If we find
|
|
|
|
one with the same underlying variable as the PHI result,
|
|
|
|
then replace the value in the argument with its equivalent
|
2005-04-13 16:34:13 +02:00
|
|
|
SSA_NAME. Use the most recent equivalence as hopefully
|
2005-04-13 06:29:40 +02:00
|
|
|
that results in shortest lifetimes. */
|
2005-05-02 18:47:03 +02:00
|
|
|
for (j = VEC_length (tree, elt->equivalences) - 1; j >= 0; j--)
|
2005-04-13 06:29:40 +02:00
|
|
|
{
|
2005-05-02 18:47:03 +02:00
|
|
|
tree equiv = VEC_index (tree, elt->equivalences, j);
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
if (SSA_NAME_VAR (equiv) == SSA_NAME_VAR (PHI_RESULT (phi)))
|
|
|
|
{
|
|
|
|
SET_PHI_ARG_DEF (phi, e->dest_idx, equiv);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If we had an equivalence associated with this edge, remove it. */
|
|
|
|
if (e->aux)
|
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
struct edge_equivalency *equiv = (struct edge_equivalency *) e->aux;
|
2005-04-13 06:29:40 +02:00
|
|
|
remove_equivalence (equiv->rhs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Ignoring loop backedges, if BB has precisely one incoming edge then
|
|
|
|
return that edge. Otherwise return NULL. */
|
|
|
|
static edge
|
|
|
|
single_incoming_edge_ignoring_loop_edges (basic_block bb)
|
|
|
|
{
|
|
|
|
edge retval = NULL;
|
|
|
|
edge e;
|
|
|
|
edge_iterator ei;
|
|
|
|
|
|
|
|
FOR_EACH_EDGE (e, ei, bb->preds)
|
|
|
|
{
|
|
|
|
/* A loop back edge can be identified by the destination of
|
|
|
|
the edge dominating the source of the edge. */
|
|
|
|
if (dominated_by_p (CDI_DOMINATORS, e->src, e->dest))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* If we have already seen a non-loop edge, then we must have
|
|
|
|
multiple incoming non-loop edges and thus we return NULL. */
|
|
|
|
if (retval)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
/* This is the first non-loop incoming edge we have found. Record
|
|
|
|
it. */
|
|
|
|
retval = e;
|
|
|
|
}
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
uncprop_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
|
|
|
|
basic_block bb)
|
|
|
|
{
|
|
|
|
basic_block parent;
|
|
|
|
edge e;
|
|
|
|
bool recorded = false;
|
|
|
|
|
|
|
|
/* If this block is dominated by a single incoming edge and that edge
|
|
|
|
has an equivalency, then record the equivalency and push the
|
|
|
|
VALUE onto EQUIV_STACK. Else push a NULL entry on EQUIV_STACK. */
|
|
|
|
parent = get_immediate_dominator (CDI_DOMINATORS, bb);
|
|
|
|
if (parent)
|
|
|
|
{
|
|
|
|
e = single_incoming_edge_ignoring_loop_edges (bb);
|
|
|
|
|
|
|
|
if (e && e->src == parent && e->aux)
|
|
|
|
{
|
2005-12-18 10:26:53 +01:00
|
|
|
struct edge_equivalency *equiv = (struct edge_equivalency *) e->aux;
|
2005-04-13 06:29:40 +02:00
|
|
|
|
|
|
|
record_equiv (equiv->rhs, equiv->lhs);
|
2005-04-25 01:23:33 +02:00
|
|
|
VEC_safe_push (tree, heap, equiv_stack, equiv->rhs);
|
2005-04-13 06:29:40 +02:00
|
|
|
recorded = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!recorded)
|
2005-04-25 01:23:33 +02:00
|
|
|
VEC_safe_push (tree, heap, equiv_stack, NULL_TREE);
|
2005-04-13 06:29:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool
|
|
|
|
gate_uncprop (void)
|
|
|
|
{
|
|
|
|
return flag_tree_dom != 0;
|
|
|
|
}
|
|
|
|
|
re PR other/35094 (RTL dump file letters hosed and partly undocumented)
* gcc.dg/20050811-2.c: Update dumping flags.
* gcc.dg/sms-2.c: Update dumping flags.
* gcc.dg/var-expand1.c: Update dumping flags.
* gcc.dg/var-expand3.c: Update dumping flags.
* gcc.dg/pr30957-1.c: Update dumping flags.
* gcc.dg/20050811-1.c: Update dumping flags.
* gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail.
* gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail.
PR other/35094
* toplev.c (decode_d_option): Handle all CPP flags.
* tree-vrp.c: Update tree_pass descriptors.
* regrename.c: Update tree_pass descriptors.
* fwprop.c: Update tree_pass descriptors.
* doc/invoke.texi: Remove documentation of dropped -d? flags.
* tree-into-ssa.c: Update tree_pass descriptors.
* tree-dump.c: Update tree_pass descriptors.
* tree-complex.c: Update tree_pass descriptors.
* tree-dump.h: Update tree_pass descriptors.
* see.c: Update tree_pass descriptors.
* cgraphbuild.c: Update tree_pass descriptors.
* tracer.c: Update tree_pass descriptors.
* tree-loop-distribution.c: Update tree_pass descriptors.
* cgraph.c: Update tree_pass descriptors.
* postreload-gcse.c: Update tree_pass descriptors.
* postreload.c: Update tree_pass descriptors.
* tree-ssa-loop-ch.c: Update tree_pass descriptors.
* tree-tailcall.c: Update tree_pass descriptors.
* tree-pass.h (tree_opt_pass): Rename to ...
(opt_pass) ... this one; add "type" field and remove letter field.
(gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New.
(execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes,
all_lowering_passes): Update declaration.
* ipa-cp.c: Update tree_pass descriptors.
* final.c: Update tree_pass descriptors.
* omp-low.c: Update tree_pass descriptors.
* tree-ssa-dse.c: Update tree_pass descriptors.
* ipa-reference.c: Update tree_pass descriptors.
* tree-ssa-uncprop.c: Update tree_pass descriptors.
* auto-inc-dec.c: Update tree_pass descriptors.
* reorg.c: Update tree_pass descriptors.
* cgraphunit.c: Update tree_pass descriptors.
* tree-ssa-copyrename.c: Update tree_pass descriptors.
* tree-ssa-ccp.c: Update tree_pass descriptors.
* df-core.c: Update tree_pass descriptors.
* mode-switching.c: Update tree_pass descriptors.
* tree-nomudflap.c: Update tree_pass descriptors.
* modulo-sched.c: Update tree_pass descriptors.
* ipa-pure-const.c: Update tree_pass descriptors.
* cse.c: Update tree_pass descriptors.
* web.c: Update tree_pass descriptors.
* tree-stdarg.c: Update tree_pass descriptors.
* tree-ssa-math-opts.c: Update tree_pass descriptors.
* tree-ssa-dom.c: Update tree_pass descriptors.
* tree-nrv.c: Update tree_pass descriptors.
* tree-ssa-alias.c: Update tree_pass descriptors.
* loop-init.c: Update tree_pass descriptors.
* gimple-low.c: Update tree_pass descriptors.
* ipa-inline.c: Update tree_pass descriptors.
* tree-ssa-sink.c: Update tree_pass descriptors.
* global.c: Update tree_pass descriptors.
* ifcvt.c: Update tree_pass descriptors.
* jump.c: Update tree_pass descriptors.
* predict.c: Update tree_pass descriptors.
* tree-ssa-loop.c: Update tree_pass descriptors.
* recog.c: Update tree_pass descriptors.
* dse.c: Update tree_pass descriptors.
* tree-ssa-ifcombine.c: Update tree_pass descriptors.
* tree-eh.c: Update tree_pass descriptors.
* regmove.c: Update tree_pass descriptors.
* local-alloc.c
* function.c: Update tree_pass descriptors.
* tree-vectorizer.c: Update tree_pass descriptors.
* gcse.c: Update tree_pass descriptors.
* ipa-type-escape.c: Update tree_pass descriptors.
* tree-if-conv.c: Update tree_pass descriptors.
* init-regs.c: Update tree_pass descriptors.
* ipa.c: Update tree_pass descriptors.
* tree-ssa-phiopt.c: Update tree_pass descriptors.
* rtl-factoring.c: Update tree_pass descriptors.
* lower-subreg.c: Update tree_pass descriptors.
* bt-load.c: Update tree_pass descriptors.
* tree-dfa.c: Update tree_pass descriptors.
* except.c: Update tree_pass descriptors.
* emit-rtl.c: Update tree_pass descriptors.
* cfgexpand.c: Update tree_pass descriptors.
* tree-cfgcleanup.c: Update tree_pass descriptors.
* cfgcleanup.c: Update tree_pass descriptors.
* tree-ssa-pre.c: Update tree_pass descriptors.
* tree-sra.c: Update tree_pass descriptors.
* tree-mudflap.c: Update tree_pass descriptors.
* tree-ssa-copy.c: Update tree_pass descriptors.
* cfglayout.c: Update tree_pass descriptors.
* tree-ssa-forwprop.c: Update tree_pass descriptors.
* tree-ssa-dce.c: Update tree_pass descriptors.
* tree-ssa.c: Update tree_pass descriptors.
* regclass.c: Update tree_pass descriptors.
* integrate.c: Update tree_pass descriptors.
* tree-optimize.c: Update tree_pass descriptors.
* tree-ssa-phiprop.c: Update tree_pass descriptors.
* tree-object-size.c: Update tree_pass descriptors.
* combine.c: Update tree_pass descriptors.
* tree-outof-ssa.c: Update tree_pass descriptors.
* bb-reorder.c: Update tree_pass descriptors.
* stack-ptr-mod.c: Update tree_pass descriptors.
* var-tracking.c: Update tree_pass descriptors.
* tree-profile.c: Update tree_pass descriptors.
* tree-vect-generic.c: Update tree_pass descriptors.
* reg-stack.c: Update tree_pass descriptors.
* sched-rgn.c: Update tree_pass descriptors.
* tree-ssa-structalias.c: Update tree_pass descriptors.
* tree-cfg.c: Update tree_pass descriptors.
* passes.c (current_pass): Update declaration.
(finish_optimization_passes): Update.
(all_passes, all_ipa_passes, all_lowering_passes): Update declaration.
(register_one_dump_file, register_dump_files_1, next_pass_1):
Update arguments.
(init_optimization_passes): Update handling of new types.
(execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update.
* ipa-struct-reorg.c: Update tree_pass descriptors.
* tree-ssa-reassoc.c: Update tree_pass descriptors.
* combine-stack-adj.c: Update tree_pass descriptors.
* cfgrtl.c: Update tree_pass descriptors.
* dce.c: Update tree_pass descriptors.
* tree-ssanames.c: Update tree_pass descriptors.
From-SVN: r133342
2008-03-19 12:22:40 +01:00
|
|
|
struct gimple_opt_pass pass_uncprop =
|
2005-04-13 06:29:40 +02:00
|
|
|
{
|
re PR other/35094 (RTL dump file letters hosed and partly undocumented)
* gcc.dg/20050811-2.c: Update dumping flags.
* gcc.dg/sms-2.c: Update dumping flags.
* gcc.dg/var-expand1.c: Update dumping flags.
* gcc.dg/var-expand3.c: Update dumping flags.
* gcc.dg/pr30957-1.c: Update dumping flags.
* gcc.dg/20050811-1.c: Update dumping flags.
* gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail.
* gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail.
PR other/35094
* toplev.c (decode_d_option): Handle all CPP flags.
* tree-vrp.c: Update tree_pass descriptors.
* regrename.c: Update tree_pass descriptors.
* fwprop.c: Update tree_pass descriptors.
* doc/invoke.texi: Remove documentation of dropped -d? flags.
* tree-into-ssa.c: Update tree_pass descriptors.
* tree-dump.c: Update tree_pass descriptors.
* tree-complex.c: Update tree_pass descriptors.
* tree-dump.h: Update tree_pass descriptors.
* see.c: Update tree_pass descriptors.
* cgraphbuild.c: Update tree_pass descriptors.
* tracer.c: Update tree_pass descriptors.
* tree-loop-distribution.c: Update tree_pass descriptors.
* cgraph.c: Update tree_pass descriptors.
* postreload-gcse.c: Update tree_pass descriptors.
* postreload.c: Update tree_pass descriptors.
* tree-ssa-loop-ch.c: Update tree_pass descriptors.
* tree-tailcall.c: Update tree_pass descriptors.
* tree-pass.h (tree_opt_pass): Rename to ...
(opt_pass) ... this one; add "type" field and remove letter field.
(gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New.
(execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes,
all_lowering_passes): Update declaration.
* ipa-cp.c: Update tree_pass descriptors.
* final.c: Update tree_pass descriptors.
* omp-low.c: Update tree_pass descriptors.
* tree-ssa-dse.c: Update tree_pass descriptors.
* ipa-reference.c: Update tree_pass descriptors.
* tree-ssa-uncprop.c: Update tree_pass descriptors.
* auto-inc-dec.c: Update tree_pass descriptors.
* reorg.c: Update tree_pass descriptors.
* cgraphunit.c: Update tree_pass descriptors.
* tree-ssa-copyrename.c: Update tree_pass descriptors.
* tree-ssa-ccp.c: Update tree_pass descriptors.
* df-core.c: Update tree_pass descriptors.
* mode-switching.c: Update tree_pass descriptors.
* tree-nomudflap.c: Update tree_pass descriptors.
* modulo-sched.c: Update tree_pass descriptors.
* ipa-pure-const.c: Update tree_pass descriptors.
* cse.c: Update tree_pass descriptors.
* web.c: Update tree_pass descriptors.
* tree-stdarg.c: Update tree_pass descriptors.
* tree-ssa-math-opts.c: Update tree_pass descriptors.
* tree-ssa-dom.c: Update tree_pass descriptors.
* tree-nrv.c: Update tree_pass descriptors.
* tree-ssa-alias.c: Update tree_pass descriptors.
* loop-init.c: Update tree_pass descriptors.
* gimple-low.c: Update tree_pass descriptors.
* ipa-inline.c: Update tree_pass descriptors.
* tree-ssa-sink.c: Update tree_pass descriptors.
* global.c: Update tree_pass descriptors.
* ifcvt.c: Update tree_pass descriptors.
* jump.c: Update tree_pass descriptors.
* predict.c: Update tree_pass descriptors.
* tree-ssa-loop.c: Update tree_pass descriptors.
* recog.c: Update tree_pass descriptors.
* dse.c: Update tree_pass descriptors.
* tree-ssa-ifcombine.c: Update tree_pass descriptors.
* tree-eh.c: Update tree_pass descriptors.
* regmove.c: Update tree_pass descriptors.
* local-alloc.c
* function.c: Update tree_pass descriptors.
* tree-vectorizer.c: Update tree_pass descriptors.
* gcse.c: Update tree_pass descriptors.
* ipa-type-escape.c: Update tree_pass descriptors.
* tree-if-conv.c: Update tree_pass descriptors.
* init-regs.c: Update tree_pass descriptors.
* ipa.c: Update tree_pass descriptors.
* tree-ssa-phiopt.c: Update tree_pass descriptors.
* rtl-factoring.c: Update tree_pass descriptors.
* lower-subreg.c: Update tree_pass descriptors.
* bt-load.c: Update tree_pass descriptors.
* tree-dfa.c: Update tree_pass descriptors.
* except.c: Update tree_pass descriptors.
* emit-rtl.c: Update tree_pass descriptors.
* cfgexpand.c: Update tree_pass descriptors.
* tree-cfgcleanup.c: Update tree_pass descriptors.
* cfgcleanup.c: Update tree_pass descriptors.
* tree-ssa-pre.c: Update tree_pass descriptors.
* tree-sra.c: Update tree_pass descriptors.
* tree-mudflap.c: Update tree_pass descriptors.
* tree-ssa-copy.c: Update tree_pass descriptors.
* cfglayout.c: Update tree_pass descriptors.
* tree-ssa-forwprop.c: Update tree_pass descriptors.
* tree-ssa-dce.c: Update tree_pass descriptors.
* tree-ssa.c: Update tree_pass descriptors.
* regclass.c: Update tree_pass descriptors.
* integrate.c: Update tree_pass descriptors.
* tree-optimize.c: Update tree_pass descriptors.
* tree-ssa-phiprop.c: Update tree_pass descriptors.
* tree-object-size.c: Update tree_pass descriptors.
* combine.c: Update tree_pass descriptors.
* tree-outof-ssa.c: Update tree_pass descriptors.
* bb-reorder.c: Update tree_pass descriptors.
* stack-ptr-mod.c: Update tree_pass descriptors.
* var-tracking.c: Update tree_pass descriptors.
* tree-profile.c: Update tree_pass descriptors.
* tree-vect-generic.c: Update tree_pass descriptors.
* reg-stack.c: Update tree_pass descriptors.
* sched-rgn.c: Update tree_pass descriptors.
* tree-ssa-structalias.c: Update tree_pass descriptors.
* tree-cfg.c: Update tree_pass descriptors.
* passes.c (current_pass): Update declaration.
(finish_optimization_passes): Update.
(all_passes, all_ipa_passes, all_lowering_passes): Update declaration.
(register_one_dump_file, register_dump_files_1, next_pass_1):
Update arguments.
(init_optimization_passes): Update handling of new types.
(execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update.
* ipa-struct-reorg.c: Update tree_pass descriptors.
* tree-ssa-reassoc.c: Update tree_pass descriptors.
* combine-stack-adj.c: Update tree_pass descriptors.
* cfgrtl.c: Update tree_pass descriptors.
* dce.c: Update tree_pass descriptors.
* tree-ssanames.c: Update tree_pass descriptors.
From-SVN: r133342
2008-03-19 12:22:40 +01:00
|
|
|
{
|
|
|
|
GIMPLE_PASS,
|
2005-04-13 06:29:40 +02:00
|
|
|
"uncprop", /* name */
|
|
|
|
gate_uncprop, /* gate */
|
|
|
|
tree_ssa_uncprop, /* execute */
|
|
|
|
NULL, /* sub */
|
|
|
|
NULL, /* next */
|
|
|
|
0, /* static_pass_number */
|
|
|
|
TV_TREE_SSA_UNCPROP, /* tv_id */
|
|
|
|
PROP_cfg | PROP_ssa, /* properties_required */
|
|
|
|
0, /* properties_provided */
|
|
|
|
0, /* properties_destroyed */
|
|
|
|
0, /* todo_flags_start */
|
re PR other/35094 (RTL dump file letters hosed and partly undocumented)
* gcc.dg/20050811-2.c: Update dumping flags.
* gcc.dg/sms-2.c: Update dumping flags.
* gcc.dg/var-expand1.c: Update dumping flags.
* gcc.dg/var-expand3.c: Update dumping flags.
* gcc.dg/pr30957-1.c: Update dumping flags.
* gcc.dg/20050811-1.c: Update dumping flags.
* gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail.
* gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail.
PR other/35094
* toplev.c (decode_d_option): Handle all CPP flags.
* tree-vrp.c: Update tree_pass descriptors.
* regrename.c: Update tree_pass descriptors.
* fwprop.c: Update tree_pass descriptors.
* doc/invoke.texi: Remove documentation of dropped -d? flags.
* tree-into-ssa.c: Update tree_pass descriptors.
* tree-dump.c: Update tree_pass descriptors.
* tree-complex.c: Update tree_pass descriptors.
* tree-dump.h: Update tree_pass descriptors.
* see.c: Update tree_pass descriptors.
* cgraphbuild.c: Update tree_pass descriptors.
* tracer.c: Update tree_pass descriptors.
* tree-loop-distribution.c: Update tree_pass descriptors.
* cgraph.c: Update tree_pass descriptors.
* postreload-gcse.c: Update tree_pass descriptors.
* postreload.c: Update tree_pass descriptors.
* tree-ssa-loop-ch.c: Update tree_pass descriptors.
* tree-tailcall.c: Update tree_pass descriptors.
* tree-pass.h (tree_opt_pass): Rename to ...
(opt_pass) ... this one; add "type" field and remove letter field.
(gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New.
(execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes,
all_lowering_passes): Update declaration.
* ipa-cp.c: Update tree_pass descriptors.
* final.c: Update tree_pass descriptors.
* omp-low.c: Update tree_pass descriptors.
* tree-ssa-dse.c: Update tree_pass descriptors.
* ipa-reference.c: Update tree_pass descriptors.
* tree-ssa-uncprop.c: Update tree_pass descriptors.
* auto-inc-dec.c: Update tree_pass descriptors.
* reorg.c: Update tree_pass descriptors.
* cgraphunit.c: Update tree_pass descriptors.
* tree-ssa-copyrename.c: Update tree_pass descriptors.
* tree-ssa-ccp.c: Update tree_pass descriptors.
* df-core.c: Update tree_pass descriptors.
* mode-switching.c: Update tree_pass descriptors.
* tree-nomudflap.c: Update tree_pass descriptors.
* modulo-sched.c: Update tree_pass descriptors.
* ipa-pure-const.c: Update tree_pass descriptors.
* cse.c: Update tree_pass descriptors.
* web.c: Update tree_pass descriptors.
* tree-stdarg.c: Update tree_pass descriptors.
* tree-ssa-math-opts.c: Update tree_pass descriptors.
* tree-ssa-dom.c: Update tree_pass descriptors.
* tree-nrv.c: Update tree_pass descriptors.
* tree-ssa-alias.c: Update tree_pass descriptors.
* loop-init.c: Update tree_pass descriptors.
* gimple-low.c: Update tree_pass descriptors.
* ipa-inline.c: Update tree_pass descriptors.
* tree-ssa-sink.c: Update tree_pass descriptors.
* global.c: Update tree_pass descriptors.
* ifcvt.c: Update tree_pass descriptors.
* jump.c: Update tree_pass descriptors.
* predict.c: Update tree_pass descriptors.
* tree-ssa-loop.c: Update tree_pass descriptors.
* recog.c: Update tree_pass descriptors.
* dse.c: Update tree_pass descriptors.
* tree-ssa-ifcombine.c: Update tree_pass descriptors.
* tree-eh.c: Update tree_pass descriptors.
* regmove.c: Update tree_pass descriptors.
* local-alloc.c
* function.c: Update tree_pass descriptors.
* tree-vectorizer.c: Update tree_pass descriptors.
* gcse.c: Update tree_pass descriptors.
* ipa-type-escape.c: Update tree_pass descriptors.
* tree-if-conv.c: Update tree_pass descriptors.
* init-regs.c: Update tree_pass descriptors.
* ipa.c: Update tree_pass descriptors.
* tree-ssa-phiopt.c: Update tree_pass descriptors.
* rtl-factoring.c: Update tree_pass descriptors.
* lower-subreg.c: Update tree_pass descriptors.
* bt-load.c: Update tree_pass descriptors.
* tree-dfa.c: Update tree_pass descriptors.
* except.c: Update tree_pass descriptors.
* emit-rtl.c: Update tree_pass descriptors.
* cfgexpand.c: Update tree_pass descriptors.
* tree-cfgcleanup.c: Update tree_pass descriptors.
* cfgcleanup.c: Update tree_pass descriptors.
* tree-ssa-pre.c: Update tree_pass descriptors.
* tree-sra.c: Update tree_pass descriptors.
* tree-mudflap.c: Update tree_pass descriptors.
* tree-ssa-copy.c: Update tree_pass descriptors.
* cfglayout.c: Update tree_pass descriptors.
* tree-ssa-forwprop.c: Update tree_pass descriptors.
* tree-ssa-dce.c: Update tree_pass descriptors.
* tree-ssa.c: Update tree_pass descriptors.
* regclass.c: Update tree_pass descriptors.
* integrate.c: Update tree_pass descriptors.
* tree-optimize.c: Update tree_pass descriptors.
* tree-ssa-phiprop.c: Update tree_pass descriptors.
* tree-object-size.c: Update tree_pass descriptors.
* combine.c: Update tree_pass descriptors.
* tree-outof-ssa.c: Update tree_pass descriptors.
* bb-reorder.c: Update tree_pass descriptors.
* stack-ptr-mod.c: Update tree_pass descriptors.
* var-tracking.c: Update tree_pass descriptors.
* tree-profile.c: Update tree_pass descriptors.
* tree-vect-generic.c: Update tree_pass descriptors.
* reg-stack.c: Update tree_pass descriptors.
* sched-rgn.c: Update tree_pass descriptors.
* tree-ssa-structalias.c: Update tree_pass descriptors.
* tree-cfg.c: Update tree_pass descriptors.
* passes.c (current_pass): Update declaration.
(finish_optimization_passes): Update.
(all_passes, all_ipa_passes, all_lowering_passes): Update declaration.
(register_one_dump_file, register_dump_files_1, next_pass_1):
Update arguments.
(init_optimization_passes): Update handling of new types.
(execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update.
* ipa-struct-reorg.c: Update tree_pass descriptors.
* tree-ssa-reassoc.c: Update tree_pass descriptors.
* combine-stack-adj.c: Update tree_pass descriptors.
* cfgrtl.c: Update tree_pass descriptors.
* dce.c: Update tree_pass descriptors.
* tree-ssanames.c: Update tree_pass descriptors.
From-SVN: r133342
2008-03-19 12:22:40 +01:00
|
|
|
TODO_dump_func | TODO_verify_ssa /* todo_flags_finish */
|
|
|
|
}
|
2005-04-13 06:29:40 +02:00
|
|
|
};
|