[all-commits] [llvm/llvm-project] 526541: [MLIR][LLVMIR] Import: add flag to prefer using un...
Bruno Cardoso Lopes via All-commits
all-commits at lists.llvm.org
Fri Mar 14 18:04:55 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5265412c13b4581e55e5d419f39a2206139b30c6
https://github.com/llvm/llvm-project/commit/5265412c13b4581e55e5d419f39a2206139b30c6
Author: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
Date: 2025-03-14 (Fri, 14 Mar 2025)
Changed paths:
M mlir/include/mlir/Target/LLVMIR/Import.h
M mlir/include/mlir/Target/LLVMIR/LLVMImportInterface.h
M mlir/include/mlir/Target/LLVMIR/ModuleImport.h
M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
M mlir/lib/Target/LLVMIR/LLVMImportInterface.cpp
M mlir/lib/Target/LLVMIR/ModuleImport.cpp
A mlir/test/Target/LLVMIR/Import/intrinsic-prefer-unregistered.ll
Log Message:
-----------
[MLIR][LLVMIR] Import: add flag to prefer using unregistered intrinsics (#130685)
Currently, there is no common mechanism for supported intrinsics to be
generically annotated with arg and ret attributes. Since there are many
supported intrinsics around different dialects, the amount of work to
teach all them about these attributes is not trivial (though it would be
nice in the long term).
This PR adds a new flag `-prefer-unregistered-intrinsics` that can be
used alongside `--import-llvm` to always use `llvm.intrinsic_call`
during import time (ignoring dialect hooks for custom intrinsic
support).
Using this flag allow us to roundtrip the LLVM IR while eliminating a
whole set of differences coming from lack of arg/ret attributes on
supported intrinsics.
Note `convertIntrinsic` has to be moved to an implementation file
because it queries into `moduleImport` state, which is a fwd declaration
in `LLVMImportInterface.h`
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