]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ia64.md: Define new attribute "empty".
authorAndreas Schwab <schwab@suse.de>
Wed, 7 Jul 2004 15:32:28 +0000 (15:32 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Wed, 7 Jul 2004 15:32:28 +0000 (15:32 +0000)
* config/ia64/ia64.md: Define new attribute "empty".
(prologue_use, nop_x, insn_group_barrier): Set it.

* config/ia64/ia64.c (ia64_reorg): When looking for trailing call
skip over "empty" insns.

From-SVN: r84204

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.md

index a4e628fd6524ae38b6f3b8c4a8466792c26ef4a9..49c0e83586bcf0581460995bac132882454ab1ca 100644 (file)
@@ -1,3 +1,11 @@
+2004-07-07  Andreas Schwab  <schwab@suse.de>
+
+       * config/ia64/ia64.md: Define new attribute "empty".
+       (prologue_use, nop_x, insn_group_barrier): Set it.
+
+       * config/ia64/ia64.c (ia64_reorg): When looking for trailing call
+       skip over "empty" insns.
+
 2004-07-04  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/contrib.texi (Contributors): Adjust link for GNU Classpath.
index 6ffaff6dea22d9886c6d349f2b7e3ecc4531e945..77b2ed7ba7dc5fffcfaf07f2f5ee6bed6466108e 100644 (file)
@@ -7175,11 +7175,12 @@ ia64_reorg (insns)
       insn = get_last_insn ();
       if (! INSN_P (insn))
         insn = prev_active_insn (insn);
-      if (GET_CODE (insn) == INSN
-         && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
-         && XINT (PATTERN (insn), 1) == UNSPECV_INSN_GROUP_BARRIER)
-       {
-         saw_stop = 1;
+      /* Skip over insns that expand to nothing.  */
+      while (GET_CODE (insn) == INSN && get_attr_empty (insn) == EMPTY_YES)
+        {
+         if (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
+             && XINT (PATTERN (insn), 1) == UNSPECV_INSN_GROUP_BARRIER)
+           saw_stop = 1;
          insn = prev_active_insn (insn);
        }
       if (GET_CODE (insn) == CALL_INSN)
index f711f13e9d3e5b843e68d2bb1fb6eaddc9ec495d..2dfef5d730d069ddd3f13c07341b9deb812e63c9 100644 (file)
 
 (define_attr "predicable" "no,yes" (const_string "yes"))
 
+;; Empty.  True iff this insn does not generate any code.
+
+(define_attr "empty" "no,yes" (const_string "no"))
+
 \f
 ;; ::::::::::::::::::::
 ;; ::
   ""
   ""
   [(set_attr "itanium_class" "ignore")
-   (set_attr "predicable" "no")])
+   (set_attr "predicable" "no")
+   (set_attr "empty" "yes")])
 
 ;; Allocate a new register frame.
 
   [(const_int 5)]
   ""
   ""
-  [(set_attr "itanium_class" "nop_x")])
+  [(set_attr "itanium_class" "nop_x")
+   (set_attr "empty" "yes")])
 
 (define_insn "bundle_selector"
   [(unspec [(match_operand 0 "const_int_operand" "")] UNSPEC_BUNDLE_SELECTOR)]
   ""
   ";;"
   [(set_attr "itanium_class" "stop_bit")
-   (set_attr "predicable" "no")])
+   (set_attr "predicable" "no")
+   (set_attr "empty" "yes")])
 
 (define_expand "trap"
   [(trap_if (const_int 1) (const_int 0))]