================
@@ -653,13 +631,13 @@ def CIR_AllocaOp : CIR_Op<"alloca", [
   }];
 
   let assemblyFormat = [{
-    $allocaType `,` qualified(type($addr)) `,`
+    $name
+    `align` `(` $alignment `)`
+    oilist( `init`              $init
+          | `const`             $constant
+          | `cleanup_dest_slot` $cleanup_dest_slot)
     ($dynAllocSize^ `:` type($dynAllocSize) `,`)?
-    `[` $name
-       (`,` `init` $init^)?
-       (`,` `const` $constant^)?
-       (`,` `cleanup_dest_slot` $cleanup_dest_slot^)?
-    `]`
+    $allocaType `->` qualified(type($addr))
----------------
xlauko wrote:

hmm, sorry not catching this earlier, isn't allocaType always 
addr.getElementType? in such case we can infer it and never print it, maybe it 
is even unnecessery to store it 2 times? just add member like:
```
mlir::Type getAllocaType() { return getAddr().getElementType(): }
```
?

https://github.com/llvm/llvm-project/pull/198962
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to