Make GCC move instructions between a multi-cycle instruction and the next instruction that depends on its result.
William Tambe
tambewilliam@gmail.com
Wed Feb 23 00:51:22 GMT 2022
On Tue, Feb 22, 2022 at 6:24 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> On Tue, Feb 22, 2022 at 03:15:55PM -0600, William Tambe via Gcc-help wrote:
> [snip]
> > > Without above transformation, `add %4 %7` would cause the cpu to wait
> > > on `div %4 %5` when it could have executed instructions that do not
> > > depend on the result of "div".
> >
> > How to implement above transformation such that GCC moves instructions
> > between a multi-cycle instruction and the next instruction that
> > depends on its result ?
>
> GCC has a pretty advanced instruction scheduler. You can start looking
> at <https://gcc.gnu.org/onlinedocs/gccint/Scheduling.html> for example?
>
Thank you for the pointer; could you suggest an existing example close
to what I am looking to implement that uses above TARGET_SCHED_* hooks
?
>
> Segher
More information about the Gcc-help
mailing list