diff options
author | Sean Silva <chisophugis@gmail.com> | 2016-07-02 23:47:27 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2016-07-02 23:47:27 +0000 |
commit | 45835e731d41d45e92973b4845d7f75e6997cb22 (patch) | |
tree | 65974666335fc28c12461b043187889ddec4fe4e /llvm/lib/Transforms/InstCombine | |
parent | e690b7a3c6b5cff7ce0e1e8824ab305f0fbad045 (diff) | |
download | bcm5719-llvm-45835e731d41d45e92973b4845d7f75e6997cb22.tar.gz bcm5719-llvm-45835e731d41d45e92973b4845d7f75e6997cb22.zip |
Remove dead TLI arg of isKnownNonNull and propagate deadness. NFC.
This actually uncovered a surprisingly large chain of ultimately unused
TLI args.
From what I can gather, this argument is a remnant of when
isKnownNonNull would look at the TLI directly.
The current approach seems to be that InferFunctionAttrs runs early in
the pipeline and uses TLI to annotate the TLI-dependent non-null
information as return attributes.
This also removes the dependence of functionattrs on TLI altogether.
llvm-svn: 274455
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index c2cf21d5221..60a40d489fb 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -2320,7 +2320,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) { return replaceInstUsesWith(*II, ConstantPointerNull::get(PT)); // isKnownNonNull -> nonnull attribute - if (isKnownNonNullAt(DerivedPtr, II, DT, TLI)) + if (isKnownNonNullAt(DerivedPtr, II, DT)) II->addAttribute(AttributeSet::ReturnIndex, Attribute::NonNull); } @@ -2483,7 +2483,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) { for (Value *V : CS.args()) { if (V->getType()->isPointerTy() && !CS.paramHasAttr(ArgNo + 1, Attribute::NonNull) && - isKnownNonNullAt(V, CS.getInstruction(), DT, TLI)) + isKnownNonNullAt(V, CS.getInstruction(), DT)) Indices.push_back(ArgNo + 1); ArgNo++; } |