[PATCH] D20957: [JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfo
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 10:10:09 PDT 2016
davidxl added inline comments.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1955
@@ +1954,3 @@
+/// be removed. This is important in order to prevent dangling pointer problems.
+void JumpThreadingPass::ForgetBlockAnalysisResults(BasicBlock *BB) {
+ LVI->eraseBlock(BB);
----------------
nit: ForgetBlockAnalysisResults --> dropBlockAnalysisResults(..)
================
Comment at: test/Transforms/JumpThreading/dangling-pointers-in-bpi.ll:1
@@ +1,2 @@
+; RUN: opt -S -jump-threading %s | FileCheck %s
+
----------------
should 2>&1 be needed ?
http://reviews.llvm.org/D20957
More information about the llvm-commits
mailing list