[all-commits] [llvm/llvm-project] f17abc: [mlir][emitc] Add address-of and dereference ops (...

Gil Rapaport via All-commits all-commits at lists.llvm.org
Wed Dec 3 02:41:51 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f17abc280c708c16f622be2de2ab7d0710cc8bc1
      https://github.com/llvm/llvm-project/commit/f17abc280c708c16f622be2de2ab7d0710cc8bc1
  Author: Gil Rapaport <gil.rapaport at mobileye.com>
  Date:   2025-12-03 (Wed, 03 Dec 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
    M mlir/lib/Conversion/MemRefToEmitC/MemRefToEmitC.cpp
    M mlir/lib/Dialect/EmitC/IR/EmitC.cpp
    M mlir/lib/Target/Cpp/TranslateToCpp.cpp
    M mlir/test/Conversion/MemRefToEmitC/memref-to-emitc-alloc-copy.mlir
    M mlir/test/Conversion/MemRefToEmitC/memref-to-emitc-copy.mlir
    M mlir/test/Conversion/MemRefToEmitC/memref-to-emitc.mlir
    M mlir/test/Dialect/EmitC/invalid_ops.mlir
    M mlir/test/Dialect/EmitC/ops.mlir
    M mlir/test/Target/Cpp/common-cpp.mlir
    M mlir/test/Target/Cpp/expressions.mlir

  Log Message:
  -----------
  [mlir][emitc] Add address-of and dereference ops (#72569)

EmitC currently models C's `&` and `*` operators via its `apply` op,
which has several drawbacks:

- Its pre-lvalue semantics combines dereferencing with memory access.

- Representing multiple opcodes (selected by an attribute) in a single
op complicates the code by adding a second, attribute-based selection
layer on top of MLIR's standard `isa<>` mechanism.

This patch adds two distinct, lvalue-based ops to model these C operators.
EmitC passes were converted to use the new ops instead of `apply`, which
is now deprecated.



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