summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-04-12 23:19:51 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-04-12 23:19:51 +0000
commit4e1ec636e1c3c9168f9c265788b2d7d9f27e58fe (patch)
tree8fd71244ae2db3213f96568e4f812a00039fb25c /clang
parent9e7dda3c6df231c3f682659cccaa3abf736899c4 (diff)
downloadbcm5719-llvm-4e1ec636e1c3c9168f9c265788b2d7d9f27e58fe.tar.gz
bcm5719-llvm-4e1ec636e1c3c9168f9c265788b2d7d9f27e58fe.zip
ArgList: cache index ranges containing arguments with each ID
Improve performance of argument list parsing with large numbers of IDs and large numbers of arguments, by tracking a conservative range of indexes within the argument list that might contain an argument with each ID. In the worst case (when the first and last argument with a given ID are at the opposite ends of the argument list), this still results in a linear-time walk of the list, but it helps substantially in the common case where each ID occurs only once, or a few times close together in the list. This gives a ~10x speedup to clang's `test/Driver/response-file.c`, which constructs a very large set of command line arguments and feeds them to the clang driver. Differential Revision: https://reviews.llvm.org/D30130 llvm-svn: 300135
Diffstat (limited to 'clang')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud