OSDN Git Service

For Marcus - Implement sync primitives inline for ARM.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-loop-im.c
index 51d9e93..2e65d10 100644 (file)
@@ -23,12 +23,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "rtl.h"
 #include "tm_p.h"
-#include "hard-reg-set.h"
 #include "basic-block.h"
 #include "output.h"
-#include "diagnostic.h"
+#include "tree-pretty-print.h"
+#include "gimple-pretty-print.h"
 #include "tree-flow.h"
 #include "tree-dump.h"
 #include "timevar.h"
@@ -37,7 +36,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "params.h"
 #include "tree-pass.h"
 #include "flags.h"
-#include "real.h"
 #include "hashtab.h"
 #include "tree-affine.h"
 #include "pointer-set.h"
@@ -275,8 +273,7 @@ for_each_index (tree *addr_p, bool (*cbck) (tree, tree *, void *), void *data)
          return cbck (*addr_p, addr_p, data);
 
        case MISALIGNED_INDIRECT_REF:
-       case ALIGN_INDIRECT_REF:
-       case INDIRECT_REF:
+       case MEM_REF:
          nxt = &TREE_OPERAND (*addr_p, 0);
          return cbck (*addr_p, nxt, data);
 
@@ -1986,12 +1983,15 @@ gen_lsm_tmp_name (tree ref)
   switch (TREE_CODE (ref))
     {
     case MISALIGNED_INDIRECT_REF:
-    case ALIGN_INDIRECT_REF:
-    case INDIRECT_REF:
+    case MEM_REF:
       gen_lsm_tmp_name (TREE_OPERAND (ref, 0));
       lsm_tmp_name_add ("_");
       break;
 
+    case ADDR_EXPR:
+      gen_lsm_tmp_name (TREE_OPERAND (ref, 0));
+      break;
+
     case BIT_FIELD_REF:
     case VIEW_CONVERT_EXPR:
     case ARRAY_RANGE_REF:
@@ -2152,7 +2152,8 @@ ref_always_accessed_p (struct loop *loop, mem_ref_p ref, bool stored_p)
   tree base;
 
   base = get_base_address (ref->mem);
-  if (INDIRECT_REF_P (base))
+  if (INDIRECT_REF_P (base)
+      || TREE_CODE (base) == MEM_REF)
     base = TREE_OPERAND (base, 0);
 
   get_all_locs_in_loop (loop, ref, &locs);
@@ -2171,7 +2172,8 @@ ref_always_accessed_p (struct loop *loop, mem_ref_p ref, bool stored_p)
          lhs = get_base_address (gimple_get_lhs (loc->stmt));
          if (!lhs)
            continue;
-         if (INDIRECT_REF_P (lhs))
+         if (INDIRECT_REF_P (lhs)
+             || TREE_CODE (lhs) == MEM_REF)
            lhs = TREE_OPERAND (lhs, 0);
          if (lhs != base)
            continue;