You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IntegerMultiplyDecomposer [1] is an optimization in the x86 backend to strength-reduce integer multiplies into cheaper forms and leveraging LEA instructions as much as possible. This code has not been updated much at all in the past 20 years despite significant evolution in Intel and AMD architectures and varying recommendations on the use of LEA instructions in certain circumstances.
This code should be revisited and its optimization decisions reconsidered in the context of modern Intel and AMD microarchitectures.
The point of the integer multiply decomposer was to leverage sequences of LEAs, adds, shifts, etc to efficiently decompose multiplications of constants into cheaper, equivalent instructions to the multiply.
Does tree simplification prevent decomposition into those sequences because it thinks it is doing the right thing, and is the generated code from the tree simplifier any better? Are those instruction sequences from the integer multiply decomposer still optimal on modern x86 hardware (they were determined years ago on early Intel, perhaps P4)? If yes and yes, then perhaps the tree simplifier needs to ask the codegens for guidance before transforming.
The IntegerMultiplyDecomposer [1] is an optimization in the x86 backend to strength-reduce integer multiplies into cheaper forms and leveraging LEA instructions as much as possible. This code has not been updated much at all in the past 20 years despite significant evolution in Intel and AMD architectures and varying recommendations on the use of LEA instructions in certain circumstances.
This code should be revisited and its optimization decisions reconsidered in the context of modern Intel and AMD microarchitectures.
[1] https://github.com/eclipse/omr/blob/master/compiler/x/codegen/IntegerMultiplyDecomposer.cpp
The text was updated successfully, but these errors were encountered: