File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
flang/lib/Optimizer/CodeGen Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -826,20 +826,23 @@ struct TargetAArch64 : public GenericTarget<TargetAArch64> {
826826 return marshal;
827827 }
828828
829+ // Determine if the type is a Homogenous Floating-point Aggregate (HFA). An
830+ // HFA is a record type with up to 4 floating-point members of the same type.
829831 static bool isHFA (fir::RecordType ty) {
830832 auto types = ty.getTypeList ();
831833 if (types.empty () || types.size () > 4 ) {
832834 return false ;
833835 }
834836
835837 if (!isa_real (types.front ().second )) {
836- types.front ().second .dump ();
837838 return false ;
838839 }
839840
840841 return llvm::all_equal (llvm::make_second_range (types));
841842 }
842843
844+ // AArch64 procedure call ABI:
845+ // https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#parameter-passing
843846 CodeGenSpecifics::Marshalling
844847 structReturnType (mlir::Location loc, fir::RecordType ty) const override {
845848 CodeGenSpecifics::Marshalling marshal;
@@ -855,7 +858,7 @@ struct TargetAArch64 : public GenericTarget<TargetAArch64> {
855858
856859 // return in registers if size <= 16 bytes
857860 if (size <= 16 ) {
858- auto dwordSize = (size + 7 ) / 8 ;
861+ std:: size_t dwordSize = (size + 7 ) / 8 ;
859862 auto newTy = fir::SequenceType::get (
860863 dwordSize, mlir::IntegerType::get (ty.getContext (), 64 ));
861864 marshal.emplace_back (newTy, AT{});
You can’t perform that action at this time.
0 commit comments