[mlir][LLVMIR] Add support for va_start/copy/end intrinsicsThis patch adds three new LLVM intrinsic operations: llvm.intr.vastart/copy/end.And its translation from LLVM IR.This effectively remov
[mlir][LLVMIR] Add support for va_start/copy/end intrinsicsThis patch adds three new LLVM intrinsic operations: llvm.intr.vastart/copy/end.And its translation from LLVM IR.This effectively removes a restriction, imposed by 0126dcf1f0a1, wherenon-external functions in LLVM dialect cannot be variadic. At that timeit was not clear how LLVM intrinsics are going to be modeled, whichindirectly affects va_start/copy/end, the core intrinsics used invariadic functions. But since we have LLVM intrinsics as normalMLIR operations, it's not a problem anymore.Differential Revision: https://reviews.llvm.org/D127540
show more ...
Don't use Optional::hasValue (NFC)
[mlir] replace 'emit_c_wrappers' func->llvm conversion option with a passThe 'emit_c_wrappers' option in the FuncToLLVM conversion requests C interfacewrappers to be emitted for every builtin func
[mlir] replace 'emit_c_wrappers' func->llvm conversion option with a passThe 'emit_c_wrappers' option in the FuncToLLVM conversion requests C interfacewrappers to be emitted for every builtin function in the module. While this hasbeen useful to bootstrap the interface, it is problematic in the longer term asit may unintentionally affect the functions that should retain their existinginterface, e.g., libm functions obtained by lowering math operations (seeD126964 for an example). Since D77314, we have a finer-grain control overinterface generation via an attribute that avoids the problem entirely. Removethe 'emit_c_wrappers' option. Introduce the '-llvm-request-c-wrappers' passthat can be run in any pipeline that needs blanket emission of functions toannotate all builtin functions with the attribute before performing the usuallowering that accounts for the attribute.Reviewed By: cheliniDifferential Revision: https://reviews.llvm.org/D127952
[mlir] (NFC) Clean up bazel and CMake target namesAll dialect targets in bazel have been named *Dialect and all dialecttargets in CMake have been named MLIR*Dialect.
[mlir][LLVM] Add support for Calling Convention in LLVMFuncOpThis patch adds support for Calling Convention attribute in LLVMdialect, including enums, custom syntax and import from LLVM IR.Additi
[mlir][LLVM] Add support for Calling Convention in LLVMFuncOpThis patch adds support for Calling Convention attribute in LLVMdialect, including enums, custom syntax and import from LLVM IR.Additionally fix import of dso_local attribute.Reviewed By: ftynseDifferential Revision: https://reviews.llvm.org/D126161
[mlir:NFC] Remove the forward declaration of FuncOp in the mlir namespaceFuncOp has been moved to the `func` namespace for a little over a month, theusing directive can be dropped now.
[MLIR] Check for static shape before bare pointer conversionOriginally in the returnOp conversion, the result type was changing to barepointer if the type was a memref. This is incorrect as conver
[MLIR] Check for static shape before bare pointer conversionOriginally in the returnOp conversion, the result type was changing to barepointer if the type was a memref. This is incorrect as conversion to barepointer can only be done if the memref has static shape, strides and offset.Reviewed By: ftynseDifferential Revision: https://reviews.llvm.org/D123121
Apply clang-tidy fixes for readability-redundant-control-flow in FuncToLLVM.cpp (NFC)
Apply clang-tidy fixes for llvm-qualified-auto in FuncToLLVM.cpp (NFC)
[mlir:FunctionOpInterface] Rename the "type" attribute to "function_type"This removes any potential confusion with the `getType` accessorswhich correspond to SSA results of an operation, and makes
[mlir:FunctionOpInterface] Rename the "type" attribute to "function_type"This removes any potential confusion with the `getType` accessorswhich correspond to SSA results of an operation, and makes itclear what the intent is (i.e. to represent the type of the function).Differential Revision: https://reviews.llvm.org/D121762
[mlir] Fix --convert-func-to-llvm=emit-c-wrappers argument and result attribute handlingWhen using `--convert-func-to-llvm=emit-c-wrappers` the attribute arguments of the wrapper would not be creat
[mlir] Fix --convert-func-to-llvm=emit-c-wrappers argument and result attribute handlingWhen using `--convert-func-to-llvm=emit-c-wrappers` the attribute arguments of the wrapper would not be created correctly in some cases.This patch fixes that and introduces a set of tests for (hopefully) all corner cases.See https://github.com/llvm/llvm-project/issues/53503Author: Sam Carroll <[email protected]>Co-Author: Laszlo Kindrat <[email protected]>Reviewed By: ftynseDifferential Revision: https://reviews.llvm.org/D119895
[mlir][NFC] Update the Builtin dialect to use "Both" accessorsDifferential Revision: https://reviews.llvm.org/D121189
[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