Asher Mancinelli ca1ff80a16
[MLIR] Add sincos fusion pass (#161413)
We see performance improvements from using sincos to reuse calculations
in hot loops that compute sin() and cos() of the same operand. Add a
pass to identify sin() and cos() calls in the same block with the same
operand and fast-math flags, and fuse them into a sincos op.

Follow-up to:
* #160561
* #160772
2025-10-01 07:15:42 -07:00

27 lines
504 B
CMake

add_mlir_dialect_library(MLIRMathTransforms
AlgebraicSimplification.cpp
ExpandOps.cpp
ExtendToSupportedTypes.cpp
PolynomialApproximation.cpp
SincosFusion.cpp
UpliftToFMA.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Math/Transforms
DEPENDS
MLIRMathTransformsIncGen
LINK_LIBS PUBLIC
MLIRArithDialect
MLIRComplexDialect
MLIRDialectUtils
MLIRIR
MLIRMathDialect
MLIRSCFDialect
MLIRPass
MLIRTransforms
MLIRX86VectorDialect
MLIRVectorDialect
)