The default calling convention needs to save/restore the SVE callee
saves according to the SVE PCS when the function takes or returns
scalable types, even when the aarch64_sve_vector_pcs CC is not
specified for the function.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp | ||
---|---|---|
51–56 | Could just do return any_of(... | |
73 | Since the SVE calling convention is really an extension of the "normal" calling convention I think it makes sense for this logic to be at the bottom just before the return. So the flow is: if (function_specifies_calling_convention_x) return calling_convention_x_save_list if (function_specifies_calling_convention_y) return calling_convention_y_save_list .... if (function_has_sve_args_or_return) return sve_save_list return default_save_list I guess you could leave the CallingConv::AArch64_SVE_VectorCall code as is given it fits this mould, but since this isn't supposed to be a user visible attribute I wonder if we can remove it at a later date? |
- s/needsSVECallingConvention/hasSVEArgsorReturn/
- Moved case to bottom of if/else chain.
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp | ||
---|---|---|
43 | s/hasSVEArgsorReturn/hasSVEArgsOrReturn/ ? |
s/hasSVEArgsorReturn/hasSVEArgsOrReturn/ ?