Hi Sam,

Just a quick comment: yes, we want LICM for Turboshaft, but it's not quite
the right time to implement it: before adding more risk via additional
optimizations, we need to ship what we have, that's turned out to be
difficult enough.

The status quo is that we rely on Loop Peeling plus subsequent Load
Elimination and GVN, but we know that there are cases where we decide not
to peel but would nevertheless like to hoist some stuff out of the loop. On
the flip side, when it does trigger, the current strategy is more powerful:
operations that can throw (JS) or trap (Wasm) cannot be LICM'ed (because
the loop could run for zero iterations in practice), but they can be
deduplicated after Peeling.

Of course, it's always a good time to learn how stuff works, so I don't
want to discourage that :-)

Cheers,
Jakob


On Thu, Aug 29, 2024 at 2:35 PM Sam Parker-Haynes <[email protected]>
wrote:

> Hi,
>
> I've been looking at some regressions when moving from Turbofan to
> Turboshaft and I've noticed loop-invariant code being left inside loops
> generated from Turboshaft. I assume this was something that came for free
> with the sea-of-nodes..?
>
> Looking at the existing reducers, the copying-phase and variable-reducer
> seem as if they have the necessary parts to enable a
> loop-invariant-code-motion reducer to be simple enough. Does this sound
> about right..?
>
> One, little, thing is that I still don't really understand the whole
> input/output graph mechanics... Is there something I could read or could
> someone explain? Maybe in the context of moving operations out of a loop :)
>
> cheers,
> sam
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAKSzg3SpVB0pmYsO5aEa-kn5aLHHTcv_zUBqTAVFCO0LnZYQFg%40mail.gmail.com.

Reply via email to