[Mlir-commits] [mlir] [mlir][EmitC] Model lvalues as a type in EmitC (PR #91475)

Matthias Gehre llvmlistbot at llvm.org
Tue Jun 11 07:13:23 PDT 2024


================
@@ -835,6 +835,21 @@ def EmitC_LogicalOrOp : EmitC_BinaryOp<"logical_or", [CExpression]> {
   let assemblyFormat = "operands attr-dict `:` type(operands)";
 }
 
+def EmitC_LValueLoadOp : EmitC_Op<"lvalue_load", [
+  TypesMatchWith<"result type matches value type of 'operand'",
+                  "operand", "result",
+                  "::llvm::cast<LValueType>($_self).getValue()">
+]> {
+  let summary = "load an lvalue by assigning it to a local variable";
+  let description = [{}];
----------------
mgehre-amd wrote:

Some text explaining that after loading an lvalue, modifications of the lvalue are not visible in the loaded value.

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


More information about the Mlir-commits mailing list