[all-commits] [llvm/llvm-project] e62464: [mlir][EmitC] Add `verbatim` op (#79584)

Simon Camphausen via All-commits all-commits at lists.llvm.org
Wed Jan 31 02:56:29 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e624648bd903208a92d8edbecbfa92085d1c34dc
      https://github.com/llvm/llvm-project/commit/e624648bd903208a92d8edbecbfa92085d1c34dc
  Author: Simon Camphausen <simon.camphausen at iml.fraunhofer.de>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

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

  Log Message:
  -----------
  [mlir][EmitC] Add `verbatim` op (#79584)

The `verbatim` operation produces no results and the value is emitted as
is followed by a line break ('\n' character) during translation.

Note: Use with caution. This operation can have arbitrary effects on the
semantics of the emitted code. Use semantically more meaningful
operations whenever possible. Additionally this op is *NOT* intended to
be used to inject large snippets of code.

This operation can be used in situations where a more suitable operation
is not yet implemented in the dialect or where preprocessor directives
interfere with the structure of the code.

Co-authored-by: Marius Brehler <marius.brehler at iml.fraunhofer.de>




More information about the All-commits mailing list