[PATCH] D24173: Explicitly require DominatorTreeAnalysis pass for instsimplify pass.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 15:17:29 PDT 2016
danielcdh added a comment.
In https://reviews.llvm.org/D24173#535251, @davidxl wrote:
> What breaks without the change?
When I enable LoopSink pass, I need to add InstSimplifierPass pass after it to do some cleanup. However, if I directly invoke InstSimplifierPass pass, it will fail due to lack of DT.
>From the InstSimplifierPass implementation, it uses DT without checking if it is nullptr. So I think we should explicitly require DT for this pass.
A typical use of DT from InstSimplifierPass is:
llvm::SimplifyInstruction->
llvm::SimplifyICmpInst->
SimplifyICmpInst ->
computePointerICmp->
llvm::isKnownNonNullAt (ValueTracking.cpp) ->
isKnownNonNullFromDominatingCondition (ValueTracking.cpp) ->
llvm::DominatorTree::dominates (Dominators.cpp)
https://reviews.llvm.org/D24173
More information about the llvm-commits
mailing list