[all-commits] [llvm/llvm-project] 0049ad: [MLIR] emitc: Add fmtArgs to verbatim (#123294)

Matthias Gehre via All-commits all-commits at lists.llvm.org
Tue Feb 18 12:38:00 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0049adfe122502444ca9cac6d059570e91e9b923
      https://github.com/llvm/llvm-project/commit/0049adfe122502444ca9cac6d059570e91e9b923
  Author: Matthias Gehre <matthias.gehre at amd.com>
  Date:   2025-02-18 (Tue, 18 Feb 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/EmitC/IR/EmitC.h
    M mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
    M mlir/lib/Dialect/EmitC/IR/EmitC.cpp
    M mlir/lib/Target/Cpp/TranslateToCpp.cpp
    M mlir/test/Dialect/EmitC/invalid_ops.mlir
    M mlir/test/Dialect/EmitC/ops.mlir
    M mlir/test/Target/Cpp/verbatim.mlir

  Log Message:
  -----------
  [MLIR] emitc: Add fmtArgs to verbatim (#123294)

Allows to print code snippets that refer to arguments or local
variables. E.g. `emitc.verbatim "#pragma abc var={}" args %arg0 :
!emitc.ptr<i32>` is printed as `#pragma abc var=v1` when the translator
had decided to print `%arg0` as `v1`.

As a follow-up PR, we will use the same infra to extend opaque type,
which provides a way to generate template types depending on the
spelling of other types.



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