This part of the series started by D9375, and adds some code to clean-up dead llvm.noalias intrinsics. Specifically:
Hmm. What about NULL in address space 0?
Good point. We can drop them then too (nothing aliases with as-0 null). I'll update.
Updated per review comments (handle the null pointer in AS-0 case).
This could be return Arg0;
Rebased (and addressed reviewer feedback)
This is marked Accepted and is first in the sequence in D9375. Is there some reason this isn't merged yet? LGTM too.