[PATCH] D28204: [ValueTracking] use nonnull argument attribute to eliminate null checks

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 31 13:59:26 PST 2016


chandlerc added a comment.

Can you add a some negative tests showing that we don't eliminate null checks *before* a call?

Also would be good to test a subtle case but one I think is correct: when CtxtI is the call instruction with the nonnull. I'm imagining something like deducing nonnull for one argument from the attribute on another when the same pointer is passed to both. Not sure what transform pass to use but it seems a good case to document.

Finally, before this goes in, I think we may need to do something to prevent worsening the bugs exposed by newer glibc marking memcpy and friends with nonnull....


https://reviews.llvm.org/D28204





More information about the llvm-commits mailing list