aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-12-03 11:10:04 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2019-12-04 10:20:52 -0800
commit95a8e8a2557e487be6133475966255661a9f6567 (patch)
tree17251e7a86b16e54783f2b6f83d3c62f3efd4c43 /llvm/unittests/ProfileData/CoverageMappingTest.cpp
parente18531595bba495946aa52c0a16b9f9238cff8bc (diff)
downloadllvm-95a8e8a2557e487be6133475966255661a9f6567.zip
llvm-95a8e8a2557e487be6133475966255661a9f6567.tar.gz
llvm-95a8e8a2557e487be6133475966255661a9f6567.tar.bz2
[dsymutil] Remove recursion from lookForChildDIEsToKeep (1/2) (NFC)
The functions lookForDIEsToKeep and keepDIEAndDependencies are mutually recursive and can cause a stackoverflow for large projects. While this has always been the case, it became a bigger issue when we parallelized dsymutil, because threads get only a fraction of the stack space. In an attempt to tackle this issue, we removed part of the recursion in r338536 by introducing a worklist. Processing of child DIEs was no longer recursive. However, we still received bug reports where we'd run out of stack space. This patch removes another recursive call from lookForDIEsToKeep. The call was used to look at DIEs that reference the current DIE. To make this possible, we inlined keepDIEAndDependencies and added this work to the existing worklist. Because the function is not tail recursive, we needed to add two more types of worklist entries to perform the subsequent work. This was tested by running dsymutil on clang built in debug (both with and without modules) and comparing the MD5 hash of the generated dSYM companion file. Differential revision: https://reviews.llvm.org/D70990
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
0 files changed, 0 insertions, 0 deletions