[mlir][complex] complex.arg op to calculate the angle of complex numberAdd complex.arg op which calculates the angle of complex number. The op name is inspired by the function carg in libm.See: h
[mlir][complex] complex.arg op to calculate the angle of complex numberAdd complex.arg op which calculates the angle of complex number. The op name is inspired by the function carg in libm.See: https://sourceware.org/newlib/libm.html#cargDifferential Revision: https://reviews.llvm.org/D128531
show more ...
[mlir] Lower complex.power and complex.rsqrt to standard dialect.Add conversion tests and correctness tests.Reviewed By: pifon2aDifferential Revision: https://reviews.llvm.org/D127255
[mlir][complex] Add complex.conj opAdd complex.conj op to calculate the complex conjugate which is widely used for the mathematical operation on the complex space.Reviewed By: pifon2aDifferenti
[mlir][complex] Add complex.conj opAdd complex.conj op to calculate the complex conjugate which is widely used for the mathematical operation on the complex space.Reviewed By: pifon2aDifferential Revision: https://reviews.llvm.org/D127181
[mlir] Add conversion and tests for complex.[sqrt|atan2] to Arith.Differential Revision: https://reviews.llvm.org/D126799
[mlir][complex] Lowering complex.tanh to standardLowering complex.tanh to standard dialects including math, arith.Reviewed By: pifon2aDifferential Revision: https://reviews.llvm.org/D126521
[mlir][complex] Add tan op for complex dialectAdd tangent operation for complex dialect. This is the follow-up change of https://reviews.llvm.org/D126521Differential Revision: https://reviews.llv
[mlir][complex] Add tan op for complex dialectAdd tangent operation for complex dialect. This is the follow-up change of https://reviews.llvm.org/D126521Differential Revision: https://reviews.llvm.org/D126685
Revert "[mlir] Lower complex.sqrt and complex.atan2 to Arithmetic dialect."This reverts commit f5fa633b0955a8cee878b384801038fccef11fdc.Integration test sparse_complex_ops.mlir breaks because of
Revert "[mlir] Lower complex.sqrt and complex.atan2 to Arithmetic dialect."This reverts commit f5fa633b0955a8cee878b384801038fccef11fdc.Integration test sparse_complex_ops.mlir breaks because of it.
[mlir] Lower complex.sqrt and complex.atan2 to Arithmetic dialect.I don't see a point here in the lit tests here since sqrt, mul and other opsexpand as well. I just added "smoke" tests to verify t
[mlir] Lower complex.sqrt and complex.atan2 to Arithmetic dialect.I don't see a point here in the lit tests here since sqrt, mul and other opsexpand as well. I just added "smoke" tests to verify that the conversion worksand does not create any illegal ops.I will create a patch that adds a simple integration test tomlir/test/Integration/Dialect/ComplexOps/ that will compare the values.Differential Revision: https://reviews.llvm.org/D126539
Lower complex.expm1 to standard dialect.Add a test.Reviewed By: pifon2aDifferential Revision: https://reviews.llvm.org/D126409
[mlir] Add sin & cos ops to complex dialectAlso adds conversions for those ops to math + arith.Differential Revision: https://reviews.llvm.org/D124773
[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][NFC] Rename StandardToLLVM to FuncToLLVMThe current StandardToLLVM conversion patterns only really handlethe Func dialect. The pass itself adds patterns for Arithmetic/CFToLLVM, butthose s
[mlir][NFC] Rename StandardToLLVM to FuncToLLVMThe current StandardToLLVM conversion patterns only really handlethe Func dialect. The pass itself adds patterns for Arithmetic/CFToLLVM, butthose should be/will be split out in a followup. This commit focuses solelyon being an NFC rename.Aside from the directory change, the pattern and pass creation API have been renamed: * populateStdToLLVMFuncOpConversionPattern -> populateFuncToLLVMFuncOpConversionPattern * populateStdToLLVMConversionPatterns -> populateFuncToLLVMConversionPatterns * createLowerToLLVMPass -> createConvertFuncToLLVMPassDifferential Revision: https://reviews.llvm.org/D120778
[mlir] Move SelectOp from Standard to ArithmeticThis is part of splitting up the standard dialect. See https://llvm.discourse.group/t/standard-dialect-the-final-chapter/ for discussion.Differenti
[mlir] Move SelectOp from Standard to ArithmeticThis is part of splitting up the standard dialect. See https://llvm.discourse.group/t/standard-dialect-the-final-chapter/ for discussion.Differential Revision: https://reviews.llvm.org/D118648
[MLIR] Replace std ops with arith dialect opsPrecursor: https://reviews.llvm.org/D110200Removed redundant ops from the standard dialect that were moved to the`arith` or `math` dialects.Renamed
[MLIR] Replace std ops with arith dialect opsPrecursor: https://reviews.llvm.org/D110200Removed redundant ops from the standard dialect that were moved to the`arith` or `math` dialects.Renamed all instances of operations in the codebase and in tests.Reviewed By: rriddle, jpienaarDifferential Revision: https://reviews.llvm.org/D110797
[mlir] Factor type reconciliation out of Standard-to-LLVM conversionConversion to the LLVM dialect is being refactored to be more progressive andis now performed as a series of independent passes
[mlir] Factor type reconciliation out of Standard-to-LLVM conversionConversion to the LLVM dialect is being refactored to be more progressive andis now performed as a series of independent passes converting differentdialects. These passes may produce `unrealized_conversion_cast` operations thatrepresent pending conversions between built-in and LLVM dialect types.Historically, a more monolithic Standard-to-LLVM conversion pass did not needthese casts as all operations were converted in one shot. Previous refactoringshave led to the requirement of running the Standard-to-LLVM conversion pass toclean up `unrealized_conversion_cast`s even though the IR had no standardoperations in it. The pass must have been also run the last among all to-LLVMpasses, in contradiction with the partial conversion logic. Additionally, theway it was set up could produce invalid operations by removing casts betweenLLVM and built-in types even when the consumer did not accept the uncastedtype, or could lead to cryptic conversion errors (recursive application of therewrite pattern on `unrealized_conversion_cast` as a means to indicate failureto eliminate casts).In fact, the need to eliminate A->B->A `unrealized_conversion_cast`s is notspecific to to-LLVM conversions and can be factored out into a separate typereconciliation pass, which is achieved in this commit. While the cast operationitself has a folder pattern, it is insufficient in most conversion passes asthe folder only applies to the second cast. Without complex legality setup inthe conversion target, the conversion infra will either consider the castoperations valid and not fold them (a separate canonicalization would benecessary to trigger the folding), or consider the first cast invalid upongeneration and stop with error. The pattern provided by the reconciliation passapplies to the first cast operation instead. Furthermore, having a separatepass makes it clear when `unrealized_conversion_cast`s could not have beeneliminated since it is the only reason why this pass can fail.Reviewed By: nicolasvasilacheDifferential Revision: https://reviews.llvm.org/D109507
[mlir][Complex]: Add lowerings for AddOp and SubOp from Complex dialect toStandard.Differential Revision: https://reviews.llvm.org/D106429
[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
Add Log1pOp to complex dialect.Also add a lowering pattern from Complex to Standard/Math dialect.Differential Revision: https://reviews.llvm.org/D105538
Add MulOp lowering from Complex dialect to Standard/Math dialect.The lowering handles special cases with NaN or infinity like C++.Differential Revision: https://reviews.llvm.org/D105270
[mlir] Add LogOp lowering from Complex dialect to Standard/Math dialect.Differential Revision: https://reviews.llvm.org/D105342
[mlir] Add SignOp to complex dialect.Also add a conversion pattern from Complex Dialect to Standard/Math Dialect.Differential Revision: https://reviews.llvm.org/D104292
[mlir] Add NegOp to complex dialect.Also add a lowering pattern from complex dialect to standard dialect.Differential Revision: https://reviews.llvm.org/D104284
[mlir] Add ExpOp to Complex dialect.Also add a conversion pattern from Complex to Standard/Math dialect.Differential Revision: https://reviews.llvm.org/D104108
12