[Mlir-commits] [mlir] [mlir][EmitC] Model lvalues as a type in EmitC (PR #91475)
Gil Rapaport
llvmlistbot at llvm.org
Wed Jun 12 13:38:55 PDT 2024
================
@@ -38,7 +38,8 @@ struct FormExpressionsPass
auto matchFun = [&](Operation *op) {
if (op->hasTrait<OpTrait::emitc::CExpression>() &&
!op->getParentOfType<emitc::ExpressionOp>() &&
- op->getNumResults() == 1)
+ op->getNumResults() == 1 &&
+ isSupportedEmitCType(op->getResult(0).getType()))
----------------
aniragil wrote:
Since the intention is to make sure result type isn't an lvalue (due to its emiision mechanism) I'd check specifically that here to make it clear. The rest of the checks in `isSupportedEmitCType` should already be done during verification.
https://github.com/llvm/llvm-project/pull/91475
More information about the Mlir-commits
mailing list