[PATCH] D127209: [SVE][AArch64] Refine hasSVEArgsOrReturn
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 04:13:17 PDT 2022
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp:69-72
bool AArch64RegisterInfo::hasSVEArgsOrReturn(const MachineFunction *MF) {
- const Function &F = MF->getFunction();
- return isa<ScalableVectorType>(F.getReturnType()) ||
- any_of(F.args(), [](const Argument &Arg) {
- return isa<ScalableVectorType>(Arg.getType());
- });
+ return (MF->getInfo<AArch64FunctionInfo>()->isSVE() ||
+ isa<ScalableVectorType>(MF->getFunction().getReturnType()));
}
----------------
Does `AArch64FunctionInfo` contain all the information we need? It looks like it contains a `MachineFunction *`. I ask because I'm wondering if we can just get rid of `AArch64RegisterInfo::hasSVEArgsOrReturn` entirely.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127209/new/
https://reviews.llvm.org/D127209
More information about the llvm-commits
mailing list