[Attributor] Handle `null` differently in capture and alias logic
authorJohannes Doerfert <jdoerfert@anl.gov>
Thu, 10 Oct 2019 05:33:21 +0000 (05:33 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Thu, 10 Oct 2019 05:33:21 +0000 (05:33 +0000)
commit72adda1740ca893ba736690f3c2e1a7c513d1874
treed53ba4230fb300f2b6aa1715a2e350c56253b16d
parent33c59abf5c69c16e5ee2b7f4846c9363980342db
[Attributor] Handle `null` differently in capture and alias logic

Summary:
`null` in the default address space (=AS 0) cannot be captured nor can
it alias anything. We make this clear now as it can be important for
callbacks and other cases later on. In addition, this patch improves the
debug output for noalias deduction.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68624

llvm-svn: 374280
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/FunctionAttrs/callbacks.ll
llvm/test/Transforms/FunctionAttrs/nocapture.ll