aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorDaniil Suchkov <suc-daniil@yandex.ru>2020-03-05 21:14:26 +0700
committerDaniil Suchkov <suc-daniil@yandex.ru>2020-03-06 19:12:12 +0700
commitb313897b3e9bc049bb7cada11c237ead77c30e2f (patch)
treed86edb420e6533ec6042aa2f31db5f10e108b094 /lldb/packages/Python/lldbsuite
parent7202d9cde9d23ba94c7f09fd6b5eafc437136542 (diff)
downloadllvm-b313897b3e9bc049bb7cada11c237ead77c30e2f.zip
llvm-b313897b3e9bc049bb7cada11c237ead77c30e2f.tar.gz
llvm-b313897b3e9bc049bb7cada11c237ead77c30e2f.tar.bz2
[BFI] Use CallbackVH to notify BFI about deletion of basic blocks
With AssertingVHs instead of bare pointers in BlockFrequencyInfoImpl::Nodes (but without CallbackVHs) ~1/36 of all tests ran by make check fail. It means that there are users of BFI that delete basic blocks while keeping BFI. Some of those transformations add new basic blocks, so if a new basic block happens to be allocated at address where an already deleted block was and we don't explicitly set block frequency for that new block, BFI will report some non-default frequency for the block even though frequency for the block was never set. Inliner is an example of a transformation that adds and removes BBs while querying and updating BFI. With this patch, thanks to updates via CallbackVH, BFI won't keep stale pointers in its Nodes map. This is a resubmission of 408349a25d0f5a012003f84c95b49bcc7782fa70 with fixed compiler warning and MSVC compilation error. Reviewers: davidxl, yamauchi, asbirlea, fhahn, fedor.sergeev Reviewed-By: asbirlea, davidxl Tags: #llvm Differential Revision: https://reviews.llvm.org/D75341
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
0 files changed, 0 insertions, 0 deletions