diff options
author | Alex Zinenko <zinenko@google.com> | 2022-06-16 13:53:49 +0300 |
---|---|---|
committer | Alex Zinenko <zinenko@google.com> | 2022-06-17 12:10:31 +0300 |
commit | 610139d2d9ce6746b3c617fb3e2f7886272d26ff (patch) | |
tree | 8b7012d3c80411728f03f3ffe36bd652a9e5d946 /utils | |
parent | c26366979b6b05cf7cb95d1279814dca7bdf7286 (diff) |
[mlir] replace 'emit_c_wrappers' func->llvm conversion option with a pass
The 'emit_c_wrappers' option in the FuncToLLVM conversion requests C interface
wrappers to be emitted for every builtin function in the module. While this has
been useful to bootstrap the interface, it is problematic in the longer term as
it may unintentionally affect the functions that should retain their existing
interface, e.g., libm functions obtained by lowering math operations (see
D126964 for an example). Since D77314, we have a finer-grain control over
interface generation via an attribute that avoids the problem entirely. Remove
the 'emit_c_wrappers' option. Introduce the '-llvm-request-c-wrappers' pass
that can be run in any pipeline that needs blanket emission of functions to
annotate all builtin functions with the attribute before performing the usual
lowering that accounts for the attribute.
Reviewed By: chelini
Differential Revision: https://reviews.llvm.org/D127952
Diffstat (limited to 'utils')
-rw-r--r-- | utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel index 5dc2b902704a..89ca55ecacab 100644 --- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel @@ -3397,6 +3397,7 @@ cc_library( hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]), includes = ["include"], deps = [ + ":FuncDialect", ":IR", ":LLVMDialect", ":LLVMPassIncGen", @@ -6484,6 +6485,7 @@ cc_binary( ":GPUTransforms", ":LLVMCommonConversion", ":LLVMDialect", + ":LLVMIRTransforms", ":LLVMToLLVMIRTranslation", ":MemRefDialect", ":MemRefToLLVM", @@ -7273,6 +7275,7 @@ cc_library( ":ConversionPassIncGen", ":FuncDialect", ":IR", + ":LLVMDialect", ":LinalgDialect", ":LinalgTransforms", ":MemRefDialect", |