mirror of git://gcc.gnu.org/git/gcc.git
rtl.def (ATTR_FLAG): Remove probability indicating flags.
* 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
This commit is contained in:
parent
780140d3af
commit
593dbe1191
|
@ -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>
|
2012-05-04 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
PR target/53228
|
PR target/53228
|
||||||
|
|
|
@ -344,14 +344,9 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
/* Output flag masks for use by reorg.
|
/* Output flag masks for use by reorg.
|
||||||
|
|
||||||
Flags are used to hold branch direction and prediction information
|
Flags are used to hold branch direction for use by eligible_for_... */
|
||||||
for use by eligible_for_... */
|
|
||||||
printf("\n#define ATTR_FLAG_forward\t0x1\n");
|
printf("\n#define ATTR_FLAG_forward\t0x1\n");
|
||||||
printf("#define ATTR_FLAG_backward\t0x2\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 */");
|
puts("\n#endif /* GCC_INSN_ATTR_H */");
|
||||||
|
|
||||||
|
|
32
gcc/reorg.c
32
gcc/reorg.c
|
@ -903,38 +903,6 @@ get_jump_flags (rtx insn, rtx label)
|
||||||
else
|
else
|
||||||
flags = 0;
|
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;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1268,9 +1268,7 @@ DEF_RTL_EXPR(EQ_ATTR_ALT, "eq_attr_alt", "ii", RTX_EXTRA)
|
||||||
true for the insn being scheduled in reorg.
|
true for the insn being scheduled in reorg.
|
||||||
|
|
||||||
genattr.c defines the following flags which can be tested by
|
genattr.c defines the following flags which can be tested by
|
||||||
(attr_flag "foo") expressions in eligible_for_delay.
|
(attr_flag "foo") expressions in eligible_for_delay: forward, backward. */
|
||||||
|
|
||||||
forward, backward, very_likely, likely, very_unlikely, and unlikely. */
|
|
||||||
|
|
||||||
DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", RTX_EXTRA)
|
DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", RTX_EXTRA)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue