[Mlir-commits] [mlir] [MLIR][JitRunner] Correctly register symbol map (PR #90381)

Ingo Müller llvmlistbot at llvm.org
Mon May 13 00:59:52 PDT 2024


ingomueller-net wrote:

> In `mlir/lib/ExecutionEngine/JitRunner.cpp` I can't find a use of `runtimeSymbolMap`. Could you please point out where it registers and uses `runtimeSymbolMap`?

The commit you mention calls `engine->registerSymbols(runtimeSymbolMap)` [here](https://github.com/llvm/llvm-project/blob/0b3841eb97/mlir/lib/ExecutionEngine/ExecutionEngine.cpp#L399).

>From memories, the intention of the commit was to preserve semtantics; let's see if I can argue how that was achieved: `runtimeSymbolMap` is a function that uses `exportSymbols` in its capture both before and after the commit. In both versions, the capture is populated with the init functions that are extracted via `getAddressOfSymbol` of all files in `libPaths`/`sharedLibPaths`. That vector, in turn, was populated by command line options of the *JiT runner* before the commit and by the options of the *execution engine*. Finally, in the JiT runner, the paths given as CLI arguments are used to construct the paths passed as options to the execution engine by the commit, so I'd expect the behavior to be exactly the same.

(What I haven't checked yet is whether the code has been modified in the meantime.)

https://github.com/llvm/llvm-project/pull/90381


More information about the Mlir-commits mailing list