#include "tree-pass.h"
#include "ggc.h"
#include "timevar.h"
-#include "toplev.h"
#include "langhooks.h"
#include "ipa-reference.h"
}
-/* A subroutine of get_expr_operands to handle MEM_REF,
- MISALIGNED_INDIRECT_REF.
+/* A subroutine of get_expr_operands to handle MEM_REF.
STMT is the statement being processed, EXPR is the MEM_REF
that got us here.
/* First record the real operands. */
get_expr_operands (stmt, &TMR_BASE (expr), opf_use | (flags & opf_no_vops));
get_expr_operands (stmt, &TMR_INDEX (expr), opf_use | (flags & opf_no_vops));
-
- if (TMR_SYMBOL (expr))
- mark_address_taken (TMR_SYMBOL (expr));
+ get_expr_operands (stmt, &TMR_INDEX2 (expr), opf_use | (flags & opf_no_vops));
add_virtual_operand (stmt, flags);
}
}
/* Clobber all memory and addressable symbols for asm ("" : : : "memory"); */
- for (i = 0; i < gimple_asm_nclobbers (stmt); i++)
- {
- tree link = gimple_asm_clobber_op (stmt, i);
- if (strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory") == 0)
- {
- add_virtual_operand (stmt, opf_def);
- break;
- }
- }
+ if (gimple_asm_clobbers_memory_p (stmt))
+ add_virtual_operand (stmt, opf_def);
}
gcc_assert (gimple_debug_bind_p (stmt));
return;
- case MISALIGNED_INDIRECT_REF:
- get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags);
- /* fall through */
-
case MEM_REF:
get_indirect_ref_operands (stmt, expr, flags, true);
return;
case COND_EXPR:
case VEC_COND_EXPR:
+ case VEC_PERM_EXPR:
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), uflags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 1), uflags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 2), uflags);
gimple_set_has_volatile_ops (stmt, true);
/* FALLTHRU */
- case TRUTH_NOT_EXPR:
case VIEW_CONVERT_EXPR:
do_unary:
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
return;
- case TRUTH_AND_EXPR:
- case TRUTH_OR_EXPR:
- case TRUTH_XOR_EXPR:
case COMPOUND_EXPR:
case OBJ_TYPE_REF:
case ASSERT_EXPR:
case REALIGN_LOAD_EXPR:
case WIDEN_MULT_PLUS_EXPR:
case WIDEN_MULT_MINUS_EXPR:
+ case FMA_EXPR:
{
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags);
/* Add call-clobbered operands, if needed. */
if (code == GIMPLE_CALL)
maybe_add_call_vops (stmt);
+
+ if (code == GIMPLE_RETURN)
+ append_vuse (gimple_vop (cfun));
}
}
timevar_push (TV_TREE_OPS);
+ /* If the stmt is a noreturn call queue it to be processed by
+ split_bbs_on_noreturn_calls during cfg cleanup. */
+ if (is_gimple_call (stmt)
+ && gimple_call_noreturn_p (stmt))
+ VEC_safe_push (gimple, gc, MODIFIED_NORETURN_CALLS (cfun), stmt);
+
gcc_assert (gimple_modified_p (stmt));
build_ssa_operands (stmt);
gimple_set_modified (stmt, false);
/* If the operand cache is active, attempt to preserve the relative
positions of these two operands in their respective immediate use
- lists. */
+ lists by adjusting their use pointer to point to the new
+ operand position. */
if (ssa_operands_active () && op0 != op1)
{
use_optype_p use0, use1, ptr;
break;
}
- /* If both uses don't have operand entries, there isn't much we can do
- at this point. Presumably we don't need to worry about it. */
- if (use0 && use1)
- {
- tree *tmp = USE_OP_PTR (use1)->use;
- USE_OP_PTR (use1)->use = USE_OP_PTR (use0)->use;
- USE_OP_PTR (use0)->use = tmp;
- }
+ /* And adjust their location to point to the new position of the
+ operand. */
+ if (use0)
+ USE_OP_PTR (use0)->use = exp1;
+ if (use1)
+ USE_OP_PTR (use1)->use = exp0;
}
/* Now swap the data. */