[all-commits] [llvm/llvm-project] a44902: merge code for llvm.emit_c_interface into convertF...
drazi via All-commits
all-commits at lists.llvm.org
Thu May 23 14:42:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a4490217fc04f00342501bdc49efcd314e2787da
https://github.com/llvm/llvm-project/commit/a4490217fc04f00342501bdc49efcd314e2787da
Author: drazi <fengxie83 at gmail.com>
Date: 2024-05-23 (Thu, 23 May 2024)
Changed paths:
M mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp
A mlir/test/Transforms/test-convert-func-op.mlir
M mlir/test/lib/Conversion/FuncToLLVM/CMakeLists.txt
A mlir/test/lib/Conversion/FuncToLLVM/TestConvertFuncOp.cpp
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
merge code for llvm.emit_c_interface into convertFuncOpToLLVMFuncOp (#92986)
In today's repo, attribute `llvm.emit_c_interface` of func op is handled
outside of `mlir::convertFuncOpToLLVMFuncOp` in `FuncOpConversion`
pattern. In some cases, `FuncOpConversion` can't be directly re-used,
but we still want to re-use the code to emit c interface for
`llvm.emit_c_interface`.
Changes in this PR
* move the code to generate c with "llvm.emit_c_interface" interface
into `mlir::convertFuncOpToLLVMFuncOp` to be able to re-use it.
* added unit test to verify c interface for jit can be generated
correctly if only call `convertFuncOpToLLVMFuncOp`.
* removed `FuncOpConversionBase`
---------
Co-authored-by: Fung Xie <ftse at nvidia.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list