This is the mail archive of the
mailing list for the GCC project.
Re: negative latencies
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: shmeel gutl <shmeelgutl at shmuelhome dot mine dot nu>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 23 May 2014 10:20:26 -0400
- Subject: Re: negative latencies
- Authentication-results: sourceware.org; auth=none
- References: <5379A125 dot 5090405 at shmuelhome dot mine dot nu> <537B7121 dot 6080408 at redhat dot com> <537BC690 dot 2030807 at shmuelhome dot mine dot nu> <537CC6A8 dot 6090607 at redhat dot com> <537EFD9B dot 5040509 at shmuelhome dot mine dot nu>
On 2014-05-23, 3:49 AM, shmeel gutl wrote:
On 21-May-14 06:30 PM, Vladimir Makarov wrote:
I am just curious what happens when you put
and insn2 uses a result of insn1 in 6 cycles and insn1 producing the
result in 3 cycles, but there are not ready functional units (e.g.
arithmentic units) necessary for insn1 for 4 or more cycles. It is
quite not trivial to guarantee that everything will be okay in general
case if you put insn2 before insn1.
This is not a problem for this architecture. The units are fully
pipelined and the only conflicts are in the first stage, during
instruction issue. That is, the vliw must be legal. The gcc dfa handles
this case fine.
Another problem is that besides insn-scheduler there are a lot of
optimizations which can insert some insns between the two insns after
scheduling. In this case the result might be not ready for insn2.
So you at least should exclude 1st insn scheduling (before RA) and make
2nd insn scheduling as the very last pass.
In general, a traditional approach is to do such things on assembler
level (e.g. as for older MIPS processor without hardware interlocks).