[mlir] Clean-up math -> libm/llvm conversion.
authorAlexander Belyaev <pifon@google.com>
Tue, 21 Feb 2023 07:18:45 +0000 (08:18 +0100)
committerAlexander Belyaev <pifon@google.com>
Tue, 21 Feb 2023 18:21:54 +0000 (19:21 +0100)
commit8a9d4895df780231a14a1afc44e18b1f6b7eab93
tree783d5401e6435b6618cabbd2701d83a941dcfb71
parent75272d5c1299db93aa619fc9e616832f578726c2
[mlir] Clean-up math -> libm/llvm conversion.

At the moment, there is an optional log1pBenefit
populateMathToLibmConversionPatterns which is used to increase the priority of
the log1p->libm pattern compared to log1p->llvm pattern that approximates
log1p with precision issues. Instead, we can have a flag for the MathToLLVM
pass to enable or disable the imprecise approximation.

Differential Revision: https://reviews.llvm.org/D144450
mlir/include/mlir/Conversion/MathToLLVM/MathToLLVM.h
mlir/include/mlir/Conversion/MathToLibm/MathToLibm.h
mlir/include/mlir/Conversion/Passes.td
mlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp
mlir/lib/Conversion/MathToLibm/MathToLibm.cpp