[dsymutil] Convert recursion in lookForDIEsToKeep into worklist.
The functions `lookForDIEsToKeep` and `keepDIEAndDependencies` can have some very deep recursion. This tackles part of this problem by removing the recursion from `lookForDIEsToKeep` by turning it into a worklist. The difficulty in doing so is the computation of incompleteness, which depends on the incompleteness of its children. To compute this, we insert "continuation markers" into the worklist. This informs the work loop to (re)compute the incompleteness property of the DIE associated with it (i.e. the parent of the previously processed DIE). This patch should generate byte-identical output. Unfortunately it also has some impact of performance, regressing by about 4% when processing clang on my machine. Differential revision: https://reviews.llvm.org/D48899 llvm-svn: 338536
Loading
Please register or sign in to comment