[PATCH] D20957: [JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo

Igor Laevsky via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 05:19:12 PDT 2016


igor-laevsky created this revision.
igor-laevsky added reviewers: sanjoy, reames, hfinkel.
igor-laevsky added a subscriber: llvm-commits.

We should update results of the BranchProbabilityInfo after removing block in JumpThreading. Otherwise we will get dangling pointer inside BranchProbabilityInfo cache. Which can lead to various problems. Note that there is similar issue for the BlockFrequencyInfo but it's a subject for separate change.

http://reviews.llvm.org/D20957

Files:
  include/llvm/Analysis/BranchProbabilityInfo.h
  include/llvm/Transforms/Utils/Local.h
  lib/Analysis/BranchProbabilityInfo.cpp
  lib/Transforms/Scalar/JumpThreading.cpp
  lib/Transforms/Utils/Local.cpp
  unittests/Analysis/BlockFrequencyInfoTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20957.59535.patch
Type: text/x-patch
Size: 6038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160603/a40c2023/attachment.bin>


More information about the llvm-commits mailing list