summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-12-02 00:11:01 +0000
committerJustin Bogner <mail@justinbogner.com>2016-12-02 00:11:01 +0000
commit35c5e58f8ce802e49dbadf52942779ec9078f0f2 (patch)
treefa5a6e721046da72b96a009b3bbb44f8f36dc593 /llvm/lib/Object/MachOObjectFile.cpp
parent8986361fa15a4560d8a241bae726bb237b5c27e5 (diff)
downloadbcm5719-llvm-35c5e58f8ce802e49dbadf52942779ec9078f0f2.tar.gz
bcm5719-llvm-35c5e58f8ce802e49dbadf52942779ec9078f0f2.zip
SDAG: Avoid a large, usually empty SmallVector in a recursive function
This SmallVector is using up 128 bytes on the stack every time despite almost always being empty[1], and since this function can recurse quite deeply that adds up to a lot of overhead. We've seen this run afoul of ulimits in some cases with ASAN on. Replacing the SmallVector with a std::vector trades an occasional heap allocation for vastly less stack usage. [1]: I gathered some stats on an internal test suite and the vector was non-empty in only 45,000 of 10,000,000 calls to this function. llvm-svn: 288441
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud