================
@@ -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:
But storing allocated type is wastefull, whis way we store the type two times
on the operation (allocated type and wrapped in result type pointer).
Though I agree from the format perspective, printing just the allocated type is
nicer. But I am not sure you can easily infer return type without storing the
allocated type using just the assembly format and traits.
Can you explore this?
In any way, I would be against printing both allocated and return type as they
are essentially the same.
https://github.com/llvm/llvm-project/pull/198962
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits