[NFC] Fix quadratic LexicalScopes::constructScopeNest
We sometimes have functions with large numbers of sibling basic blocks (usually with an error path exit from each one). This was triggering the qudratic behavior in this function - after visiting each child llvm would re-scan the parent from the beginning again. We modify the work stack to record the next index to be worked on alongside the pointer. This avoids the need to linearly search for the next unfinished child. Differential Revision: https://reviews.llvm.org/D80029
Loading
Please register or sign in to comment