[PATCH] D31052: Remove getArgumentList() in favor of arg_begin(), args(), etc
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 13:22:12 PDT 2017
rnk created this revision.
Herald added a subscriber: nemanjai.
Herald added a reviewer: javed.absar.
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()).
https://reviews.llvm.org/D31052
Files:
include/llvm/IR/Argument.h
include/llvm/IR/Function.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/IR/Function.cpp
lib/Target/AArch64/AArch64CallLowering.cpp
lib/Target/ARM/ARMCallLowering.cpp
lib/Target/AVR/AVRInstrumentFunctions.cpp
lib/Target/Mips/MipsOs16.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/X86/X86CallLowering.cpp
lib/Transforms/Coroutines/CoroElide.cpp
lib/Transforms/Coroutines/CoroFrame.cpp
lib/Transforms/Coroutines/CoroSplit.cpp
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
lib/Transforms/Utils/InlineFunction.cpp
unittests/IR/ValueTest.cpp
unittests/Transforms/Utils/IntegerDivision.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31052.92042.patch
Type: text/x-patch
Size: 14149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/e30b5dcd/attachment.bin>
More information about the llvm-commits
mailing list