get_expr_operands (stmt, &TREE_OPERAND (expr, 2), opf_none, prev_vops);
return;
+ case WITH_SIZE_EXPR:
+ /* WITH_SIZE_EXPR is a pass-through reference to it's first argument,
+ and an rvalue reference to its second argument. */
+ get_expr_operands (stmt, &TREE_OPERAND (expr, 1), opf_none, prev_vops);
+ get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags, prev_vops);
+ return;
+
case CALL_EXPR:
get_call_expr_operands (stmt, expr, prev_vops);
return;
case MODIFY_EXPR:
- get_expr_operands (stmt, &TREE_OPERAND (expr, 1), opf_none, prev_vops);
+ {
+ int subflags;
+ tree op;
+
+ get_expr_operands (stmt, &TREE_OPERAND (expr, 1), opf_none, prev_vops);
+
+ op = TREE_OPERAND (expr, 0);
+ if (TREE_CODE (op) == WITH_SIZE_EXPR)
+ op = TREE_OPERAND (expr, 0);
+ if (TREE_CODE (op) == ARRAY_REF
+ || TREE_CODE (op) == COMPONENT_REF
+ || TREE_CODE (op) == REALPART_EXPR
+ || TREE_CODE (op) == IMAGPART_EXPR)
+ subflags = opf_is_def;
+ else
+ subflags = opf_is_def | opf_kill_def;
- if (TREE_CODE (TREE_OPERAND (expr, 0)) == ARRAY_REF
- || TREE_CODE (TREE_OPERAND (expr, 0)) == COMPONENT_REF
- || TREE_CODE (TREE_OPERAND (expr, 0)) == REALPART_EXPR
- || TREE_CODE (TREE_OPERAND (expr, 0)) == IMAGPART_EXPR)
- get_expr_operands (stmt, &TREE_OPERAND (expr, 0), opf_is_def,
- prev_vops);
- else
- get_expr_operands (stmt, &TREE_OPERAND (expr, 0),
- opf_is_def | opf_kill_def, prev_vops);
- return;
+ get_expr_operands (stmt, &TREE_OPERAND (expr, 0), subflags, prev_vops);
+ return;
+ }
case VA_ARG_EXPR:
/* Mark VA_ARG_EXPR nodes as making volatile references. FIXME,
sym = (TREE_CODE (var) == SSA_NAME ? SSA_NAME_VAR (var) : var);
v_ann = var_ann (sym);
- /* FIXME: We currently refuse to optimize variables that have hidden uses
- (variables used in VLA declarations, MD builtin calls and variables
- from the parent function in nested functions). This is because not
- all uses of these variables are exposed in the IL or the statements
- that reference them are not in GIMPLE form. If that's the case, mark
- the statement as having volatile operands and return. */
- if (v_ann->has_hidden_use)
- {
- s_ann->has_volatile_ops = true;
- return;
- }
-
/* Don't expose volatile variables to the optimizers. */
if (TREE_THIS_VOLATILE (sym))
{