diff options
| author | Reid Kleckner <rnk@google.com> | 2017-03-16 22:59:15 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-03-16 22:59:15 +0000 |
| commit | 45707d4d5a11292ac5b15704a494fa970cbc650e (patch) | |
| tree | cb70c405d50cfcf2d8304b4546a7992d06ba1808 /llvm/lib/Target/ARM | |
| parent | c9a392b9dd7791420aa6475f8a2a81bf5731dfa6 (diff) | |
| download | bcm5719-llvm-45707d4d5a11292ac5b15704a494fa970cbc650e.tar.gz bcm5719-llvm-45707d4d5a11292ac5b15704a494fa970cbc650e.zip | |
Remove getArgumentList() in favor of arg_begin(), args(), etc
Users often call getArgumentList().size(), which is a linear way to get
the number of function arguments. arg_size(), on the other hand, is
constant time.
In general, the fact that arguments are stored in an iplist is an
implementation detail, so I've removed it from the Function interface
and moved all other users to the argument container APIs (arg_begin(),
arg_end(), args(), arg_size()).
Reviewed By: chandlerc
Differential Revision: https://reviews.llvm.org/D31052
llvm-svn: 298010
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMCallLowering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMCallLowering.cpp b/llvm/lib/Target/ARM/ARMCallLowering.cpp index 01239e8a74c..4662a5ccf0e 100644 --- a/llvm/lib/Target/ARM/ARMCallLowering.cpp +++ b/llvm/lib/Target/ARM/ARMCallLowering.cpp @@ -337,8 +337,7 @@ bool ARMCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, if (Subtarget->useSoftFloat() || !Subtarget->hasVFP2()) return false; - auto &Args = F.getArgumentList(); - for (auto &Arg : Args) + for (auto &Arg : F.args()) if (!isSupportedType(DL, TLI, Arg.getType())) return false; @@ -347,7 +346,7 @@ bool ARMCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder, SmallVector<ArgInfo, 8> ArgInfos; unsigned Idx = 0; - for (auto &Arg : Args) { + for (auto &Arg : F.args()) { ArgInfo AInfo(VRegs[Idx], Arg.getType()); setArgFlags(AInfo, Idx + 1, DL, F); splitToValueTypes(AInfo, ArgInfos, DL, MF.getRegInfo()); |

