[Mlir-commits] [mlir] [mlir][LLVM] Support `immargs` in LLVM_IntrOpBase intrinsics (PR #73013)
Christian Ulmann
llvmlistbot at llvm.org
Tue Nov 21 13:32:00 PST 2023
================
@@ -1199,6 +1199,45 @@ ModuleImport::convertValues(ArrayRef<llvm::Value *> values) {
return remapped;
}
+LogicalResult mlir::LLVM::detail::convertIntrinsicArguments(
+ ModuleImport &moduleInport, ArrayRef<llvm::Value *> values,
+ ArrayRef<unsigned> immArgPositions, ArrayRef<StringLiteral> immArgAttrNames,
+ SmallVectorImpl<Value> &valuesOut,
+ SmallVectorImpl<NamedAttribute> &attrsOut) {
+
+ assert(immArgPositions.size() == immArgAttrNames.size() &&
+ "LLVM `immArgPositions` and MLIR `immArgAttrNames` should have equal "
+ "length");
+
+ auto maybeMlirValues = moduleInport.convertValues(values);
----------------
Dinistro wrote:
This will produce constant ops, even when they are not required. Is there a cleanup that removes the unused constants afterwards?
https://github.com/llvm/llvm-project/pull/73013
More information about the Mlir-commits
mailing list