aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2023-03-06 17:15:53 +0100
committerMarco Elver <elver@google.com>2023-03-06 17:29:53 +0100
commitbdb4353ae00ab860ef8302f09e6f99f9d0450d19 (patch)
treea4c2c999aeb5f7480d6978c1490733d974c218fa /lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
parente969c803818cf88fb586d58505e956fe02db8696 (diff)
downloadllvm-bdb4353ae00ab860ef8302f09e6f99f9d0450d19.zip
llvm-bdb4353ae00ab860ef8302f09e6f99f9d0450d19.tar.gz
llvm-bdb4353ae00ab860ef8302f09e6f99f9d0450d19.tar.bz2
[SelectionDAG] Optimize copyExtraInfo deep copy
It turns out that there are relatively trivial, albeit rare, cases that require a MaxDepth of more than 16 (see added test). However, we want to avoid having to rely on a large fixed MaxDepth. Since these cases are relatively rare, apply the following strategy: 1. Start with a low MaxDepth of 16 - if the entry node was not reached, we can return (the common case). 2. If the entry node was reached, exponentially increase MaxDepth up to some large limit that should cover all cases and guard against stack exhaustion. This retains the better performance with a low MaxDepth in the common case, and in complex cases backs off and retries. On a whole, this is preferable vs. starting with a large MaxDepth which would unnecessarily penalize the common case where a low MaxDepth is sufficient. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D145386
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
0 files changed, 0 insertions, 0 deletions