[Mlir-commits] [mlir] [MLIR][LLVMIR] Import: add flag to prefer using unregistered intrinsics (PR #130685)
Tobias Gysi
llvmlistbot at llvm.org
Tue Mar 11 12:13:11 PDT 2025
gysit wrote:
> Hmm, while working on the PR that added the unregistered intrinsics you asked similar and I couldn't easily make it happen - there were complications in the interaction between querying other dialects via interfaces along side the fallback mechanism which is LLVM dialect only. It's probably possible but might need moving enough pieces around that should be done in its own PR.
Couldn't interface do the following:
- Try to convert intrinsics to registered intrinsics in one of the dialects.
- Return failure if it couldn't convert the intrinsic.
(no handling for unregistered intrinsics at all)
The module import could then:
- Try to convert the intrinsic to an operation using the interface (except of course your new flag is set).
- If the conversion fails instead of emitting en error just translate to llvm intrinsic call.
I would expect that this works quite smoothly except there is some issue with the error handling. I coming back to it bcs the interface should usually do the dialect specific stuff while the import itself contains most of the LLVM IR specific stuff.
Anyway let's postpone to a later pr.
https://github.com/llvm/llvm-project/pull/130685
More information about the Mlir-commits
mailing list