[MLIR][Math] Add round operationIntroduce RoundOp in the math dialect. The operation rounds the operand to thenearest integer value in floating-point format. RoundOp lowers to LLVMintrinsics 'llv
[MLIR][Math] Add round operationIntroduce RoundOp in the math dialect. The operation rounds the operand to thenearest integer value in floating-point format. RoundOp lowers to LLVMintrinsics 'llvm.intr.round' or as a function call to libm (round or roundf).Reviewed By: ftynseDifferential Revision: https://reviews.llvm.org/D127286
show more ...
[mlir][NFC] Update textual references of `func` to `func.func` in Conversion/ testsThe special case parsing of `func` operations is being removed.
[mlir] Move the Builtin FuncOp to the Func dialectThis commit moves FuncOp out of the builtin dialect, and into the Funcdialect. This move has been planned in some capacity from the momentwe made
[mlir] Move the Builtin FuncOp to the Func dialectThis commit moves FuncOp out of the builtin dialect, and into the Funcdialect. This move has been planned in some capacity from the momentwe made FuncOp an operation (years ago). This commit handles thefunctional aspects of the move, but various aspects are left untouchedto ease migration: func::FuncOp is re-exported into mlir to reducethe actual API churn, the assembly format still accepts the unqualified`func`. These temporary measures will remain for a little while tosimplify migration before being removed.Differential Revision: https://reviews.llvm.org/D121266
[mlir] Update FuncOp conversion passes to Pass/InterfacePass<FunctionOpInterface>These passes generally don't rely on any special aspects of FuncOp, and moving allowsfor these passes to be used in
[mlir] Update FuncOp conversion passes to Pass/InterfacePass<FunctionOpInterface>These passes generally don't rely on any special aspects of FuncOp, and moving allowsfor these passes to be used in many more situations. The passes that obviously weren'trelying on invariants guaranteed by a "function" were updated to be generic pass, therest were updated to be FunctionOpinterface InterfacePasses.The test updates are NFC switching from implicit nesting (-pass -pass2) form tothe -pass-pipeline form (generic passes do not implicitly nest as op-specific passes do).Differential Revision: https://reviews.llvm.org/D121190
[mlir] Rename the Standard dialect to the Func dialectThe last remaining operations in the standard dialect all revolve aroundFuncOp/function related constructs. This patch simply handles the init
[mlir] Rename the Standard dialect to the Func dialectThe last remaining operations in the standard dialect all revolve aroundFuncOp/function related constructs. This patch simply handles the initialrenaming (which by itself is already huge), but there are a large numberof cleanups unlocked/necessary afterwards:* Removing a bunch of unnecessary dependencies on Func* Cleaning up the From/ToStandard conversion passes* Preparing for the move of FuncOp to the Func dialectSee the discussion at https://discourse.llvm.org/t/standard-dialect-the-final-chapter/6061Differential Revision: https://reviews.llvm.org/D120624
[mlir] Added ctlz and cttz to math dialect and LLVM dialectCount leading/trailing zeros are an existing LLVM intrinsic. Added LLVMsupport for the intrinsics with lowerings from the math dialect to
[mlir] Added ctlz and cttz to math dialect and LLVM dialectCount leading/trailing zeros are an existing LLVM intrinsic. Added LLVMsupport for the intrinsics with lowerings from the math dialect to LLVMdialect.Reviewed By: ftynseDifferential Revision: https://reviews.llvm.org/D115206
[mlir] Add CtPop to MathOps with lowering to LLVMmath.ctpop maths to the llvm.ctpop intrinsic.Reviewed By: ftynseDifferential Revision: https://reviews.llvm.org/D114998
[mlir] factor math-to-llvm out of standard-to-llvmAfter the Math has been split out of the Standard dialect, theconversion to the LLVM dialect remained as a huge monolithic pass.This is undesirab
[mlir] factor math-to-llvm out of standard-to-llvmAfter the Math has been split out of the Standard dialect, theconversion to the LLVM dialect remained as a huge monolithic pass.This is undesirable for the same complexity management reasons as havinga huge Standard dialect itself, and is even more confusing given theexistence of a separate dialect. Extract the conversion of the Mathdialect operations to LLVM into a separate library and a separateconversion pass.Reviewed By: silvasDifferential Revision: https://reviews.llvm.org/D105702
[mlir][NFC] Rename MathToLLVM->MathToLibm
[Canonicalize] Switch the default setting to "top down".This provides a sizable compile time improvement by seedingthe worklist in an order that leads to less iterations of theworklist.This pat
[Canonicalize] Switch the default setting to "top down".This provides a sizable compile time improvement by seedingthe worklist in an order that leads to less iterations of theworklist.This patch only changes the behavior of the Canonicalize passitself, it does not affect other passes that use theGreedyPatternRewrite driverDifferential Revision: https://reviews.llvm.org/D103053
[mlir] Add patterns to lower Math operations to LLVM based libm calls.Some Math operations do not have an equivalent in LLVM. In these cases,allow a low priority fallback of calling the libm funct
[mlir] Add patterns to lower Math operations to LLVM based libm calls.Some Math operations do not have an equivalent in LLVM. In these cases,allow a low priority fallback of calling the libm functions. This is togive functionality and is not a performant option.Differential Revision: https://reviews.llvm.org/D100367