[all-commits] [llvm/llvm-project] e30b70: [mlir:python] Construct PyOperation objects in-pla...

Peter Hawkins via All-commits all-commits at lists.llvm.org
Wed Jan 22 06:27:06 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e30b703060bb6741fb5e5e05e6b37802bc29b4ce
      https://github.com/llvm/llvm-project/commit/e30b703060bb6741fb5e5e05e6b37802bc29b4ce
  Author: Peter Hawkins <phawkins at google.com>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/Bindings/Python/IRModule.h

  Log Message:
  -----------
  [mlir:python] Construct PyOperation objects in-place on the Python heap. (#123813)

Currently we make two memory allocations for each PyOperation: a Python
object, and the PyOperation class itself. With some care we can allocate
the PyOperation inline inside the Python object, saving us a malloc()
call per object and perhaps improving cache locality.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list