This is an archive of the discontinued LLVM Phabricator instance.

llvm.noalias - handling of dead intrinsics
AcceptedPublic

Authored by hfinkel on Apr 30 2015, 8:07 AM.

Details

Summary

This part of the series started by D9375, and adds some code to clean-up dead llvm.noalias intrinsics. Specifically:

  1. The intrinsic is dead if it has no users
  2. If the pointer argument is undef, the intrinsic can be removed (replaced by the undef).

Diff Detail

Event Timeline

hfinkel updated this revision to Diff 24710.Apr 30 2015, 8:07 AM
hfinkel retitled this revision from to llvm.noalias - handling of dead intrinsics.
hfinkel updated this object.
hfinkel edited the test plan for this revision. (Show Details)
hfinkel added reviewers: chandlerc, reames.
hfinkel added a subscriber: Unknown Object (MLST).
reames accepted this revision.May 12 2015, 3:36 PM
reames edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 12 2015, 3:36 PM
hfinkel updated this revision to Diff 63340.Jul 8 2016, 3:51 PM
hfinkel edited edge metadata.

Rebased.

majnemer added inline comments.
lib/Analysis/InstructionSimplify.cpp
4399–4400

Hmm. What about NULL in address space 0?

hfinkel added inline comments.Jul 10 2016, 3:22 PM
lib/Analysis/InstructionSimplify.cpp
4399–4400

Good point. We can drop them then too (nothing aliases with as-0 null). I'll update.

hfinkel updated this revision to Diff 63444.Jul 10 2016, 4:12 PM

Updated per review comments (handle the null pointer in AS-0 case).

majnemer accepted this revision.Jul 10 2016, 4:16 PM
majnemer added a reviewer: majnemer.

LGTM

majnemer added inline comments.Jul 10 2016, 9:55 PM
lib/Analysis/InstructionSimplify.cpp
4405

This could be return Arg0;

hfinkel updated this revision to Diff 73357.Oct 3 2016, 3:26 PM
hfinkel edited edge metadata.

Rebased (and addressed reviewer feedback)

troyj added a subscriber: troyj.Aug 22 2018, 9:29 AM
troyj added a comment.Aug 22 2018, 9:44 AM

This is marked Accepted and is first in the sequence in D9375. Is there some reason this isn't merged yet? LGTM too.

reames resigned from this revision.Sep 10 2021, 11:59 AM