================
@@ -293,9 +293,12 @@ mlir::ArrayAttr updateArgAttrs(mlir::MLIRContext *ctx, 
mlir::ModuleOp module,
           attrs.set(mlir::LLVM::LLVMDialect::getDeadOnReturnAttrName(),
                     builder.getI64IntegerAttr(static_cast<int64_t>(
                         llvm::DeadOnReturnInfo().toIntValue())));
+        // The object spans its allocation size, which is larger than its
+        // size for a vector whose size is not a power of two.
         attrs.set(mlir::LLVM::LLVMDialect::getDereferenceableAttrName(),
-                  builder.getI64IntegerAttr(
-                      dl.getTypeSize(pointeeTy).getFixedValue()));
+                  builder.getI64IntegerAttr(cir::CIRDataLayout(module)
----------------
bcardosolopes wrote:

nit: this builds a `CIRDataLayout` for every indirect argument. 
`CIRABIRewriteContext` already has one (`cirDataLayout`). Can you pass it in 
instead of `module`?

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

Reply via email to