Unverified Commit a4490217 authored by drazi's avatar drazi Committed by GitHub
Browse files

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: default avatarFung Xie <ftse@nvidia.com>
parent af318833
Pipeline #2606 failed with stages
in 0 seconds