Skip to content
Commit 3610d31e authored by Jan-Willem Maessen's avatar Jan-Willem Maessen Committed by Jeremy Morse
Browse files

[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
parent caa2fddc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment