diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-05-01 23:07:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-05-01 23:07:34 +0000 |
commit | 8722ae8f6083cc27bef430e2815ceea77ffa0b28 (patch) | |
tree | f302d8f896bc7708c9909c1194bcc207fa55e543 /lib/StaticAnalyzer/Core/SValBuilder.cpp | |
parent | e4c043d3fdd0f98ab724aa4f1419cec9985ea2c4 (diff) |
The semantic checking that verifies whether an Objective-C method
declared in a subclass has consistent parameter types with a method
having the same selector in a superclass performs a significant number
of lookups into the class hierarchy. In the example in
<rdar://problem/11004361>, we spend 4.7% of -fsyntax-only time in
these lookups.
Optimize away most of the calls to this routine
(Sema::CompareMethodParamsInBaseAndSuper) by first checking whether we
have ever seen *any* method with that selector (using the global
selector table). Since most selectors are unique, we can avoid the
cost of this name lookup in many cases, for a 3.3% speedup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/SValBuilder.cpp')
0 files changed, 0 insertions, 0 deletions