aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2021-09-20 18:59:19 -0700
committerVolodymyr Sapsai <vsapsai@apple.com>2021-11-03 17:11:14 -0700
commit0a35cc40b881a35c6a7a748f5fdefac4cafc33ce (patch)
tree64ca1d9f7c5e03b2db041facffdc26660715f3c2 /clang/lib/Frontend/InitPreprocessor.cpp
parent31d797f41efe00dbc3eaf5d97778f1c4dd0c15c2 (diff)
downloadllvm-0a35cc40b881a35c6a7a748f5fdefac4cafc33ce.zip
llvm-0a35cc40b881a35c6a7a748f5fdefac4cafc33ce.tar.gz
llvm-0a35cc40b881a35c6a7a748f5fdefac4cafc33ce.tar.bz2
[clang][objc] Speed up populating the global method pool from modules.
For each selector encountered in the source code, we need to load selectors from the imported modules and check that we are calling a selector with compatible types. At the moment, for each module we are storing methods declared in the headers belonging to this module and methods from the transitive closure of imported modules. When a module is imported by a few other modules, methods from the shared module are duplicated in each importer. As the result, we can end up with lots of identical methods that we try to add to the global method pool. Doing this duplicate work is useless and relatively expensive. Avoid processing duplicate methods by storing in each module only its own methods and not storing methods from dependencies. Collect methods from dependencies by walking the graph of module dependencies. The issue was discovered and reported by Richard Howell. He has done the hard work for this fix as he has investigated and provided a detailed explanation of the performance problem. Differential Revision: https://reviews.llvm.org/D110123
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions