Make GCC move instructions between a multi-cycle instruction and the next instruction that depends on its result.
Segher Boessenkool
segher@kernel.crashing.org
Wed Feb 23 00:22:53 GMT 2022
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?
Segher
More information about the Gcc-help
mailing list