[Mlir-commits] [mlir] [mlir][emitc] Turn constant into CExpression (PR #156450)

Gil Rapaport llvmlistbot at llvm.org
Thu Sep 4 01:46:41 PDT 2025


aniragil wrote:

> Anything we should alter in the op description?

Oh, right: The `expression` op comment doesn't reflect the relaxation of the single-use restriction. Good catch!

Actually, the entire single-use restriction can arguably be dropped: As the semantics of `emitc.expression` of a tree is defined as full-inlining of the the computation in the body, wrapping a DAG in an `emitc.expression` semantically captures/expresses that it is legal to expand that DAG into a tree by cloning ops as needed. Put differently, the DAG is just a compressed representation of a tree. WDYT?


https://github.com/llvm/llvm-project/pull/156450


More information about the Mlir-commits mailing list