OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-operands.c
index 7f76cbf..9012bfe 100644 (file)
@@ -943,6 +943,7 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
 
     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);
@@ -955,6 +956,12 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
        constructor_elt *ce;
        unsigned HOST_WIDE_INT idx;
 
+       /* A volatile constructor is actually TREE_CLOBBER_P, transfer
+          the volatility to the statement, don't use TREE_CLOBBER_P for
+          mirroring the other uses of THIS_VOLATILE in this file.  */
+       if (TREE_THIS_VOLATILE (expr))
+         gimple_set_has_volatile_ops (stmt, true);
+
        for (idx = 0;
             VEC_iterate (constructor_elt, CONSTRUCTOR_ELTS (expr), idx, ce);
             idx++)
@@ -968,15 +975,11 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
        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:
@@ -1153,7 +1156,8 @@ swap_tree_operands (gimple stmt, tree *exp0, tree *exp1)
 
   /* 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;
@@ -1174,14 +1178,12 @@ swap_tree_operands (gimple stmt, tree *exp0, tree *exp1)
            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.  */