Originally posted by atomsymbol
That divergence has been happening for a while now (e.g., to the best of my knowledge, there are internal registers that a micro-op can use, but you don't see them at instruction levels; IOW they are micro-architectural, not architectural).
As far as I'm concerned, a proper JIT would do some constant folding (e.g., chained adds get collapsed) and maybe some register reallocation as well, utilizing micro-architectural resources of course.
I don't know if it's worth quibbling about whether macro-op fusion, which combines two instructions into a more complex one, that the execution engine can handle as such, makes a JIT or not. If it were one out of a dozen optimization techniques, sure.
Does the fact that Intel and AMD completely control the internal micro op representation allow them to potentially do such optimizations? Yes, absolutely. But this doesn't mean that they do do it or will do it in the future. And these things are measurable, after all (Dr. Agner Fog uses synthetic code and the micro-op counter in his measurements).
Do read the paper though.
Comment