Skip to content

Commit 5a8931d

Browse files
joker-ephHoney Goyal
authored andcommitted
[MLIR][ExecutionEngine] Don't create a _mlir_ wrapper function for internal linkage (llvm#171115)
This is somehow NFC, we were creating wrapper for interal functions, which are de-facto not callable.
1 parent a424a6c commit 5a8931d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mlir/lib/ExecutionEngine/ExecutionEngine.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,10 @@ static void packFunctionArguments(Module *module) {
146146
llvm::IRBuilder<> builder(ctx);
147147
DenseSet<llvm::Function *> interfaceFunctions;
148148
for (auto &func : module->getFunctionList()) {
149-
if (func.isDeclaration()) {
149+
if (func.isDeclaration() || func.hasLocalLinkage())
150150
continue;
151-
}
152-
if (interfaceFunctions.count(&func)) {
151+
if (interfaceFunctions.count(&func))
153152
continue;
154-
}
155153

156154
// Given a function `foo(<...>)`, define the interface function
157155
// `mlir_foo(i8**)`.

0 commit comments

Comments
 (0)