]> gcc.gnu.org Git - gcc.git/commitdiff
(shorten_branches): Split all insns before computing insn lengths.
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 18 Mar 1997 22:55:01 +0000 (14:55 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 18 Mar 1997 22:55:01 +0000 (14:55 -0800)
(shorten_branches): Split all insns before computing insn
lengths.
(final_scan_insn, case default): If HAVE_ATTR_length defined, call
abort for any insn that has a '#' output template.

From-SVN: r13744

gcc/final.c

index 51296117972f1f4be5d4aad3ed260a59435c1326..64b5c500b5da298ff329f45afdadaa510b2bd21a 100644 (file)
@@ -655,6 +655,13 @@ shorten_branches (first)
   rtx body;
   int uid;
 
+  /* In order to make sure that all instructions have valid length info,
+     we must split them before we compute the address/length info.  */
+
+  for (insn = NEXT_INSN (first); insn; insn = NEXT_INSN (insn))
+    if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
+      insn = try_split (PATTERN (insn), insn, 1);
+
   /* Compute maximum UID and allocate arrays.  */
   for (insn = first; insn; insn = NEXT_INSN (insn))
     if (INSN_UID (insn) > max_uid)
@@ -2090,6 +2097,13 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
            if (new == insn && PATTERN (new) == body)
              abort ();
              
+#ifdef HAVE_ATTR_length
+           /* This instruction should have been split in shorten_branches,
+              to ensure that we would have valid length info for the
+              splitees.  */
+           abort ();
+#endif
+
            new_block = 0;
            return new;
          }
This page took 0.064024 seconds and 5 git commands to generate.