eclipse / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
933 stars 392 forks source link

Revisit optimizations in IntegerMultiplyDecomposer.cpp #7352

Open 0xdaryl opened 1 month ago

0xdaryl commented 1 month ago

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