[Mlir-commits] [mlir] [mlir][LLVMIR] Add IFuncOp to LLVM dialect (PR #147697)
Tobias Gysi
llvmlistbot at llvm.org
Fri Jul 11 06:37:09 PDT 2025
================
@@ -422,9 +422,18 @@ convertOperationImpl(Operation &opInst, llvm::IRBuilderBase &builder,
ArrayRef<llvm::Value *> operandsRef(operands);
llvm::CallInst *call;
if (auto attr = callOp.getCalleeAttr()) {
- call =
- builder.CreateCall(moduleTranslation.lookupFunction(attr.getValue()),
- operandsRef, opBundles);
+ if (llvm::Function *function =
+ moduleTranslation.lookupFunction(attr.getValue())) {
+ call = builder.CreateCall(function, operandsRef, opBundles);
+ } else {
+ Operation *module = parentLLVMModule(&opInst);
----------------
gysit wrote:
I do not have super strong opinion here.
I commented bcs `parentLLVMModule` moved to a header. I guess the helpers could be an alternative to exposing this helper function. But yeah I leave it up to you.
https://github.com/llvm/llvm-project/pull/147697
More information about the Mlir-commits
mailing list