summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-03-16 22:59:15 +0000
committerReid Kleckner <rnk@google.com>2017-03-16 22:59:15 +0000
commit45707d4d5a11292ac5b15704a494fa970cbc650e (patch)
treecb70c405d50cfcf2d8304b4546a7992d06ba1808 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parentc9a392b9dd7791420aa6475f8a2a81bf5731dfa6 (diff)
downloadbcm5719-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/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 60842b71615..cb015be8193 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -8000,7 +8000,7 @@ findArgumentCopyElisionCandidates(const DataLayout &DL,
// entries as we have arguments.
enum StaticAllocaInfo { Unknown, Clobbered, Elidable };
SmallDenseMap<const AllocaInst *, StaticAllocaInfo, 8> StaticAllocas;
- unsigned NumArgs = FuncInfo->Fn->getArgumentList().size();
+ unsigned NumArgs = FuncInfo->Fn->arg_size();
StaticAllocas.reserve(NumArgs * 2);
auto GetInfoIfStaticAlloca = [&](const Value *V) -> StaticAllocaInfo * {
OpenPOWER on IntegriCloud