summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandCompletions.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-03-16 22:25:45 +0000
committerReid Kleckner <rnk@google.com>2017-03-16 22:25:45 +0000
commiteb54909c8c7381fefdb9a0ebd457fee0ebd3088c (patch)
tree2c890ec785362ea0edfd4c9c0aa6ad874a65d4f4 /lldb/source/Commands/CommandCompletions.cpp
parent93afe18fbddf6c19975066716b3640c7f2022f9f (diff)
downloadbcm5719-llvm-eb54909c8c7381fefdb9a0ebd457fee0ebd3088c.tar.gz
bcm5719-llvm-eb54909c8c7381fefdb9a0ebd457fee0ebd3088c.zip
Make Argument::getArgNo() constant time, not O(#args)
getArgNo is actually hot in LLVM, because its how we check for attributes on arguments: bool Argument::hasNonNullAttr() const { if (!getType()->isPointerTy()) return false; if (getParent()->getAttributes(). hasAttribute(getArgNo()+1, Attribute::NonNull)) return true; It actually shows up as the 23rd hottest leaf function in a 13s sample of LTO of llc. This grows Argument by four bytes, but I have another pending patch to shrink it by removing its ilist_node base. Reviewed By: chandlerc Subscribers: inglorion, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D31057 llvm-svn: 298003
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud