summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PeepholeOptimizer.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-05-01 23:07:34 +0000
committerDouglas Gregor <dgregor@apple.com>2012-05-01 23:07:34 +0000
commitf73e2604b10e001c0b4c4fcc885275d1c9eaa624 (patch)
tree101feaffd70e9afaa98f39075462aaf83fcd97ca /llvm/lib/CodeGen/PeepholeOptimizer.cpp
parentcd2353402d6e0e0afe7cd567e76e3c4baa11b323 (diff)
downloadbcm5719-llvm-f73e2604b10e001c0b4c4fcc885275d1c9eaa624.tar.gz
bcm5719-llvm-f73e2604b10e001c0b4c4fcc885275d1c9eaa624.zip
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. llvm-svn: 155958
Diffstat (limited to 'llvm/lib/CodeGen/PeepholeOptimizer.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud