+2015-08-31 Alan Lawrence <alan.lawrence@arm.com>
+
+ * tree-ssa-dom.c (record_equivalences_from_phis,
+ record_equivalences_from_stmt, optimize_stmt): Use dom_valueize.
+ (lookup_avail_expr): Likewise, and remove comment and unused temp.
+
2015-09-01 Nick Clifton <nickc@redhat.com>
* config/msp430/msp430.opt (mcpu): Fix typo.
if (lhs == t)
continue;
- /* Valueize t. */
- if (TREE_CODE (t) == SSA_NAME)
- {
- tree tmp = SSA_NAME_VALUE (t);
- t = tmp ? tmp : t;
- }
+ t = dom_valueize (t);
/* If we have not processed an alternative yet, then set
RHS to this alternative. */
&& (TREE_CODE (rhs) == SSA_NAME
|| is_gimple_min_invariant (rhs)))
{
- /* Valueize rhs. */
- if (TREE_CODE (rhs) == SSA_NAME)
- {
- tree tmp = SSA_NAME_VALUE (rhs);
- rhs = tmp ? tmp : rhs;
- }
+ rhs = dom_valueize (rhs);
if (dump_file && (dump_flags & TDF_DETAILS))
{
tree rhs = gimple_assign_rhs1 (stmt);
tree cached_lhs;
gassign *new_stmt;
- if (TREE_CODE (rhs) == SSA_NAME)
- {
- tree tem = SSA_NAME_VALUE (rhs);
- if (tem)
- rhs = tem;
- }
+ rhs = dom_valueize (rhs);
/* Build a new statement with the RHS and LHS exchanged. */
if (TREE_CODE (rhs) == SSA_NAME)
{
{
expr_hash_elt **slot;
tree lhs;
- tree temp;
struct expr_hash_elt element;
/* Get LHS of phi, assignment, or call; else NULL_TREE. */
definition of another variable. */
lhs = (*slot)->lhs;
- /* See if the LHS appears in the CONST_AND_COPIES table. If it does, then
- use the value from the const_and_copies table. */
- if (TREE_CODE (lhs) == SSA_NAME)
- {
- temp = SSA_NAME_VALUE (lhs);
- if (temp)
- lhs = temp;
- }
+ lhs = dom_valueize (lhs);
if (dump_file && (dump_flags & TDF_DETAILS))
{