Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLIR] Feature request: translate from LLVM Dialect to LLVMIR using the C API #73008

Closed
edg-l opened this issue Nov 21, 2023 · 5 comments · Fixed by #73117
Closed

[MLIR] Feature request: translate from LLVM Dialect to LLVMIR using the C API #73008

edg-l opened this issue Nov 21, 2023 · 5 comments · Fixed by #73117
Labels
good first issue https://github.com/llvm/llvm-project/contribute mlir

Comments

@edg-l
Copy link
Contributor

edg-l commented Nov 21, 2023

I tried to search for a method to convert programatically using the C API MLIR code to LLVMIR and my conclusion is, you can't, because its missing the method mlir::translateModuleToLLVMIR (https://mlir.llvm.org/doxygen/classmlir_1_1LLVM_1_1ModuleTranslation.html#ac7e657a04e78a09ffd38c2f6cde6b905)

Are there plans to add this funcionality to the C API?

@joker-eph
Copy link
Collaborator

Feel free to submit a patch if you need the feature. It's unlikely that it'll happen until someone needs it. MLIR is driven by the needs of the contributors mainly: https://mlir.llvm.org/getting_started/Faq/#why-is-small-feature-not-available-in-mlir

@joker-eph joker-eph reopened this Nov 22, 2023
@joker-eph joker-eph changed the title [MLIR] [LLVMIR] Can't translate from MLIR to LLVMIR using the C API [MLIR] Feature request: translate from LLVM Dialect to LLVMIR using the C API Nov 22, 2023
@joker-eph joker-eph added the good first issue https://github.com/llvm/llvm-project/contribute label Nov 22, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 22, 2023

@llvm/issue-subscribers-good-first-issue

Author: Edgar (edg-l)

I tried to search for a method to convert programatically using the C API MLIR code to LLVMIR and my conclusion is, you can't, because its missing the method `mlir::translateModuleToLLVMIR` (https://mlir.llvm.org/doxygen/classmlir_1_1LLVM_1_1ModuleTranslation.html#ac7e657a04e78a09ffd38c2f6cde6b905)

Are there plans to add this funcionality to the C API?

@edg-l
Copy link
Contributor Author

edg-l commented Nov 22, 2023

Feel free to submit a patch if you need the feature. It's unlikely that it'll happen until someone needs it. MLIR is driven by the needs of the contributors mainly: https://mlir.llvm.org/getting_started/Faq/#why-is-small-feature-not-available-in-mlir

I'll try to do it then!

@vitalybuka
Copy link
Collaborator

The patch was reverted fea023b

@vitalybuka
Copy link
Collaborator

The patch was re-landed with leak fix 7fb89bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue https://github.com/llvm/llvm-project/contribute mlir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants