[all-commits] [llvm/llvm-project] 106f30: Rename MlirExecutionEngine lookup to lookupPacked

Tres via All-commits all-commits at lists.llvm.org
Mon Nov 22 05:12:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 106f3074996c69ab732c6371d5ad6b25fcfd4fa5
      https://github.com/llvm/llvm-project/commit/106f3074996c69ab732c6371d5ad6b25fcfd4fa5
  Author: Tres Popp <tpopp at google.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M mlir/include/mlir-c/ExecutionEngine.h
    M mlir/include/mlir/ExecutionEngine/ExecutionEngine.h
    M mlir/lib/Bindings/Python/ExecutionEngineModule.cpp
    M mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp
    M mlir/lib/ExecutionEngine/JitRunner.cpp

  Log Message:
  -----------
  Rename MlirExecutionEngine lookup to lookupPacked

The purpose of the change is to make clear whether the user is
retrieving the original function or the wrapper function, in line with
the invoke commands. This new functionality is useful for users that
already have defined their own packed interface, so they do not want the
extra layer of indirection, or for users wanting to the look at the
resulting primary function rather than the wrapper function.

All locations, except the python bindings now have a `lookupPacked`
method that matches the original `lookup` functionality. `lookup`
still exists, but with new semantics.

- `lookup` returns the function with a given name. If `bool f(int,int)`
is compiled, `lookup` will return a reference to `bool(*f)(int,int)`.
- `lookupPacked` returns the packed wrapper of the function with the
given name. If `bool f(int,int)` is compiled, `lookupPacked` will return
`void(*mlir_f)(void**)`.

Differential Revision: https://reviews.llvm.org/D114352




More information about the All-commits mailing list