OSDN Git Service

Correct the date for my last ChangeLog entry.
[pf3gnuchains/gcc-fork.git] / gcc / emit-rtl.c
index d722f90..46d9183 100644 (file)
@@ -1,6 +1,6 @@
 /* Emit RTL for the GCC expander.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -1546,9 +1546,9 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
             || TREE_CODE (t) == SAVE_EXPR)
        t = TREE_OPERAND (t, 0);
 
-      /* If this expression can't be addressed (e.g., it contains a reference
-        to a non-addressable field), show we don't change its alias set.  */
-      if (! can_address_p (t))
+      /* If this expression uses it's parent's alias set, mark it such
+        that we won't change it.  */
+      if (component_uses_parent_alias_set (t))
        MEM_KEEP_ALIAS_SET_P (ref) = 1;
 
       /* If this is a decl, set the attributes of the MEM from it.  */
@@ -2712,9 +2712,23 @@ get_last_insn_anywhere (void)
 rtx
 get_first_nonnote_insn (void)
 {
-  rtx insn;
+  rtx insn = first_insn;
+
+  if (insn)
+    {
+      if (NOTE_P (insn))
+       for (insn = next_insn (insn);
+            insn && NOTE_P (insn);
+            insn = next_insn (insn))
+         continue;
+      else
+       {
+         if (GET_CODE (insn) == INSN
+             && GET_CODE (PATTERN (insn)) == SEQUENCE)
+           insn = XVECEXP (PATTERN (insn), 0, 0);
+       }
+    }
 
-  for (insn = first_insn; insn && NOTE_P (insn); insn = next_insn (insn));
   return insn;
 }
 
@@ -2724,9 +2738,24 @@ get_first_nonnote_insn (void)
 rtx
 get_last_nonnote_insn (void)
 {
-  rtx insn;
+  rtx insn = last_insn;
+
+  if (insn)
+    {
+      if (NOTE_P (insn))
+       for (insn = previous_insn (insn);
+            insn && NOTE_P (insn);
+            insn = previous_insn (insn))
+         continue;
+      else
+       {
+         if (GET_CODE (insn) == INSN
+             && GET_CODE (PATTERN (insn)) == SEQUENCE)
+           insn = XVECEXP (PATTERN (insn), 0,
+                           XVECLEN (PATTERN (insn), 0) - 1);
+       }
+    }
 
-  for (insn = last_insn; insn && NOTE_P (insn); insn = previous_insn (insn));
   return insn;
 }
 
@@ -3444,7 +3473,7 @@ add_insn_before (rtx insn, rtx before)
       if (INSN_P (insn))
        bb->flags |= BB_DIRTY;
       /* Should not happen as first in the BB is always either NOTE or
-        LABEl.  */
+        LABEL.  */
       gcc_assert (BB_HEAD (bb) != insn
                  /* Avoid clobbering of structure when creating new BB.  */
                  || BARRIER_P (insn)