aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorgbtozers <stephen.tozer@sony.com>2022-02-25 17:40:18 +0000
committerStephen Tozer <stephen.tozer@sony.com>2022-03-01 13:13:38 +0000
commitb3f1480204e33865ea47363224a50280b870559b (patch)
treea27a03fba9369932bdb744074bd8b708184e657f /clang/lib/Lex/ModuleMap.cpp
parentba54ebeb5eba0f63de8ce2d73a85e9bf508008f6 (diff)
downloadllvm-b3f1480204e33865ea47363224a50280b870559b.zip
llvm-b3f1480204e33865ea47363224a50280b870559b.tar.gz
llvm-b3f1480204e33865ea47363224a50280b870559b.tar.bz2
[Dexter] Optimize breakpoint deletion in Visual Studio
Breakpoint deletion in visual studio is currently implemented by iterating over the breakpoints we want to delete, for each of which we iterate over the complete set of breakpoints in the debugger instance until we find the one we wish to delete. Ideally we would resolve this by directly deleting each breakpoint by some ID rather than searching through the full breakpoint list for them, but in the absence of such a feature in VS we can instead invert the loop to improve performance. This patch changes breakpoint deletion to iterate over the complete list of breakpoints, deleting breakpoints that match the breakpoints we expect to delete by checking set membership. This represents a worst-case improvement from O(nm) to O(n), for 'm' breakpoints being deleted out of 'n' total. In practise this is almost exactly 'm'-times faster, as when we delete multiple breakpoints they are typically adjacent in the full breakpoint list. Differential Revision: https://reviews.llvm.org/D120658
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions