IBM zSystems: Do not propagate scheduler state across basic blocks [PR108102]
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Mon, 13 Feb 2023 14:33:38 +0000 (15:33 +0100)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Mon, 13 Feb 2023 14:33:38 +0000 (15:33 +0100)
commit452db716d8debb6e09b85e4a0c0e73a047ed5c1d
treedcde5ac7a5952d368b9d07da39e9ea88730db91f
parent6995ac6f98fdfe9802b41e3bd893a4702f11cc96
IBM zSystems: Do not propagate scheduler state across basic blocks [PR108102]

So far we propagate scheduler state across basic blocks within EBBs and
reset the state otherwise.  In certain circumstances the entry block of
an EBB might be empty, i.e., no_real_insns_p is true.  In those cases
scheduler state is not reset and subsequently wrong state is propagated
to following blocks of the same EBB.

Since the performance benefit of tracking state across basic blocks is
questionable on modern hardware, simply reset the state for each basic
block.

Fix also resetting f{p,x}d_longrunning.

gcc/ChangeLog:

PR target/108102
* config/s390/s390.cc (s390_bb_fallthru_entry_likely): Remove.
(struct s390_sched_state): Initialise to zero.
(s390_sched_variable_issue): For better debuggability also emit
the current side.
(s390_sched_init): Unconditionally reset scheduler state.
gcc/config/s390/s390.cc