On 04/14/2017 09:58 AM, Richard Sandiford wrote:

.md files do have the option of using a single rtl instruction to
represent a sequence of several machine instructions but:

(a) they're then effectively asking the target-independent code to
     treat the sequence "as-if" it was a single indivisble instruction.

(b) that hampers scheduling in lots of ways, so should be avoided
     unless there's really no alternative.  One problem is that it
     stops other machine instructions from being scheduled in the
     sequence.  Another is that it makes it harder to describe the
     microarchitecture effects of the sequence, since more than one
     instruction is going through the pipeline.

So yeah, if a target does put several machine instructions into
a single rtl instruction, and one of those instructions is a store,
using store_data_bypass_p on it is going to give poor results.
But it would give poor results in general, even without the bypass.
I think it's case of "don't do that".

Sometimes it is (or was) useful to treat multiple machine
instructions as single rtl instructions during early rtl
optimisation.  It's still better to split them into individual
machine instructions for scheduling though, via define_split or
define_insn_and_split.
Agreed 100% with everything Richard says here.

I wouldn't lose any sleep if the store bypass code missed cases where multiple instructions are implemented in a single insn.

Jeff

Reply via email to