================
@@ -542,7 +543,9 @@ convertABIArgInfo(const llvm::abi::ArgInfo &info, 
MLIRContext *ctx,
     // trip for nothing.
     if (comparesAgainstCoerce && coerced == origTy)
       return ArgClassification::getDirect(nullptr);
-    return ArgClassification::getDirect(coerced);
+    ArgClassification classified = ArgClassification::getDirect(coerced);
+    classified.canFlatten = info.getCanBeFlattened();
+    return classified;
----------------
skc7 wrote:

Thanks for the suggestion @steffenlarsen.
The suggested overload is `llvm::abi::ArgInfo::getDirect`  and this call site 
builds an `mlir::abi::ArgClassification`, whose `getDirect` 
https://github.com/llvm/llvm-project/blob/011005fecf846e40dad1941f6cbbd6653ae37460/mlir/include/mlir/ABI/ABIRewriteContext.h#L93
 only takes (`Type coerced`) and has no other fields. To get the same effect, 
`Offset/Align/CanFlatten` fields need to be added in mlir `ABIRewriteContext.h`.

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

Reply via email to