[Mlir-commits] [mlir] [mlir][EmitC] Model lvalues as a type in EmitC (PR #91475)
Matthias Gehre
llvmlistbot at llvm.org
Wed Jun 12 01:43:01 PDT 2024
================
@@ -273,6 +276,18 @@ struct CppEmitter {
};
} // namespace
+/// Determine whether expression \p op should be emitted in a deferred way.
+static bool hasDeferredEmission(Operation *op) {
+ if (isa_and_nonnull<emitc::GetGlobalOp, emitc::LiteralOp, emitc::SubscriptOp>(
+ op))
+ return true;
+
+ if (auto applyOp = dyn_cast_or_null<emitc::ApplyOp>(op))
----------------
mgehre-amd wrote:
I'm in favor of splitting emitc.apply into dereference and address_of ops. Many conditionals around it just stem from the fact that it tries to do two different things.
https://github.com/llvm/llvm-project/pull/91475
More information about the Mlir-commits
mailing list