rtl.def (ATTR_FLAG): Remove probability indicating flags.
authorSteven Bosscher <steven@gcc.gnu.org>
Fri, 4 May 2012 19:37:59 +0000 (19:37 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Fri, 4 May 2012 19:37:59 +0000 (19:37 +0000)
* rtl.def (ATTR_FLAG): Remove probability indicating flags.
* genattr.c (main): Remove ATTR_FLAG_likely, ATTR_FLAG_unlikely,
ATTR_FLAG_very_likely, and ATTR_FLAG_very_unlikely.
* reorg.c (get_jump_flags): Do not set the removed flags.

From-SVN: r187178

gcc/ChangeLog
gcc/genattr.c
gcc/reorg.c
gcc/rtl.def

index 931b7f6..f09c70e 100644 (file)
@@ -1,3 +1,10 @@
+2012-05-04  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * rtl.def (ATTR_FLAG): Remove probability indicating flags.
+       * genattr.c (main): Remove ATTR_FLAG_likely, ATTR_FLAG_unlikely,
+       ATTR_FLAG_very_likely, and ATTR_FLAG_very_unlikely.
+       * reorg.c (get_jump_flags): Do not set the removed flags.
+
 2012-05-04  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/53228
index 34e710d..33030b1 100644 (file)
@@ -344,14 +344,9 @@ main (int argc, char **argv)
 
   /* Output flag masks for use by reorg.
 
-     Flags are used to hold branch direction and prediction information
-     for use by eligible_for_...  */
+     Flags are used to hold branch direction for use by eligible_for_...  */
   printf("\n#define ATTR_FLAG_forward\t0x1\n");
   printf("#define ATTR_FLAG_backward\t0x2\n");
-  printf("#define ATTR_FLAG_likely\t0x4\n");
-  printf("#define ATTR_FLAG_very_likely\t0x8\n");
-  printf("#define ATTR_FLAG_unlikely\t0x10\n");
-  printf("#define ATTR_FLAG_very_unlikely\t0x20\n");
 
   puts("\n#endif /* GCC_INSN_ATTR_H */");
 
index dfc9747..e99fe02 100644 (file)
@@ -903,38 +903,6 @@ get_jump_flags (rtx insn, rtx label)
   else
     flags = 0;
 
-  /* If insn is a conditional branch call mostly_true_jump to get
-     determine the branch prediction.
-
-     Non conditional branches are predicted as very likely taken.  */
-  if (JUMP_P (insn)
-      && (condjump_p (insn) || condjump_in_parallel_p (insn)))
-    {
-      int prediction;
-
-      prediction = mostly_true_jump (insn, get_branch_condition (insn, label));
-      switch (prediction)
-       {
-       case 2:
-         flags |= (ATTR_FLAG_very_likely | ATTR_FLAG_likely);
-         break;
-       case 1:
-         flags |= ATTR_FLAG_likely;
-         break;
-       case 0:
-         flags |= ATTR_FLAG_unlikely;
-         break;
-       case -1:
-         flags |= (ATTR_FLAG_very_unlikely | ATTR_FLAG_unlikely);
-         break;
-
-       default:
-         gcc_unreachable ();
-       }
-    }
-  else
-    flags |= (ATTR_FLAG_very_likely | ATTR_FLAG_likely);
-
   return flags;
 }
 
index 955e8e4..0695d64 100644 (file)
@@ -1268,9 +1268,7 @@ DEF_RTL_EXPR(EQ_ATTR_ALT, "eq_attr_alt", "ii", RTX_EXTRA)
    true for the insn being scheduled in reorg.
 
    genattr.c defines the following flags which can be tested by
-   (attr_flag "foo") expressions in eligible_for_delay.
-
-   forward, backward, very_likely, likely, very_unlikely, and unlikely.  */
+   (attr_flag "foo") expressions in eligible_for_delay: forward, backward.  */
 
 DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", RTX_EXTRA)