================
@@ -86,3 +90,116 @@ bool TargetInfo::maybeCommonClassifyReturnType(FunctionInfo
&FI) const {
return false;
}
+
+namespace {
+
+bool isEmptyRecordForHA(const Type *Ty) {
+ const auto *RT = dyn_cast<RecordType>(Ty);
+ return RT && RT->isEmpty();
+}
+
+} // namespace
+
+bool TargetInfo::isHomogeneousAggregate(const Type *Ty, const Type *&Base,
+ uint64_t &Members) const {
+ // TODO: Keep this in sync with Clang's handling of matrix types.
+ if (const auto *AT = dyn_cast<ArrayType>(Ty); AT && !AT->isMatrixType()) {
----------------
madhur13490 wrote:
Since `#222429` landed, Clang now treats a constant matrix as a
homogeneous aggregate when `ClangABICompat > Ver23`; see
`clang/lib/CodeGen/ABIInfo.cpp:75-83`. This branch still excludes every
matrix, so a record containing a qualifying matrix falls through to the
unsupported aggregate path instead of matching Clang.
Could this mirror Clang's matrix branch, including its compatibility
check, or exclude matrix-containing functions from LLVM ABI lowering
until the follow-up is implemented
https://github.com/llvm/llvm-project/pull/218799
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits