Liste des Groupes | Revenir à c arch |
On 6/13/2024 3:40 PM, MitchAlsup1 wrote:BGB wrote:
On 6/13/2024 11:52 AM, Stefan Monnier wrote:This is a late reply, but optimal static ordering for N-wide may be>
very non-optimal for N-1 (or N-2, etc.). As an example, assume a
perfectly
AFAICT Terje was talking about scheduling for OoO CPUs, and wasn't
talking about the possible worst case situations, but about how things
usually turn out in practice.
>
For statically-scheduled or in-order CPUs, it can be indeed more
difficult to generate code that will run (almost) optimally on a
variety
of CPUs.
>Yeah, you need to know the specifics of the pipeline for either optimal
>
machine code (in-order superscalar) or potentially to be able to run at
>
all (LIW / VLIW).That said, on some OoO CPU's, such as when I was running a Piledriver based core, it did seem as if things were scheduled to assume an in-order CPU (such as putting other instructions between memory loads and the instructions using the results, etc), it did perform better (seemingly implying there are limits to the OoO magic).When doing both Mc 88120 and K9 we found lots of sequences if code
where
the scheduling to more orderly or narrower implementations were
impeding
performance on the GBOoO core.
In this case, scheduling as-if it were an in-order core was leading to better performance than a more naive ordering (such as directly using the results of previous instructions or memory loads, vs shuffling
other
instructions in between them).
Either way, seemed to be different behavior than seen on either the Ryzen or on Intel Core based CPUs (where, seemingly, the CPU does not care about the relative order).Because it had no requirement of code scheduling, unlike 1st generation
Though, OTOH, a lot of the sorts of optimization tricks I found for the
>
Piledriver were ineffective on the Ryzen, albeit mostly because the
more
generic stuff caught up.For example, I had an LZ compressor that was faster than LZ4 on thatIt is the continuous nature of having to reschedule code every
CPU
(it was based around doing everything in terms of aligned 32-bit
dwords,
gaining speed at the cost of worse compression), but then when going over to the Ryzen, LZ4 got faster...
generation
that lead to my wanting the compiler to just spit out correct code and
in the fewest number of instructions that lead to a lot of My 66000
architecture and microarchitectures.
Mostly works for x86-64 as well.
Though, I had noted that the optimization strategies that worked wellOne of the things we found in Mc 88120 was that the compiler should
on
MSVC + Piledriver, continue to work effectively on my custom ISA /
core.
Les messages affichés proviennent d'usenet.