This is an archive of the discontinued LLVM Phabricator instance.

[InlineFunction] add nonnull assumptions based on argument attributes
AbandonedPublic

Authored by spatel on Feb 15 2017, 10:39 AM.

Details

Summary

This was suggested in D27855: have the inliner add assumptions, so we don't lose nonnull info provided by argument attributes.

This still doesn't solve PR28430 (dyn_cast), but this gets us closer...

From the use of 'dereferenceable' in the test cases, you can guess that I was drafting an alternate patch that would provide a stronger transfer of the attribute from the callee to the caller, but that would be limited in the same way that D27855 was.

Please let me know if this needs to be disabled by default pending clang fixes.

Diff Detail

Event Timeline

spatel created this revision.Feb 15 2017, 10:39 AM
mehdi_amini accepted this revision.Feb 22 2017, 12:03 PM

LGTM. Thanks.

lib/Transforms/Utils/InlineFunction.cpp
1108

could be a static variable inside the lambda, that'd reduce the scope.

This revision is now accepted and ready to land.Feb 22 2017, 12:03 PM
spatel closed this revision.Feb 27 2017, 10:28 AM

Committed at:
rL296366

spatel reopened this revision.Sep 13 2017, 7:23 AM

This one got reverted shortly after:
https://reviews.llvm.org/rL296398 / https://bugs.llvm.org/show_bug.cgi?id=32082

I was going to investigate the failure, but I got massively distracted. Reopening this review to decrease my procrastination.

This revision is now accepted and ready to land.Sep 13 2017, 7:23 AM
silvas resigned from this revision.Mar 25 2020, 6:34 PM
spatel abandoned this revision.Mar 26 2020, 5:49 AM
spatel added subscribers: uenoku, jdoerfert.

Abandoning - this seems likely to be handled by the Attributor pass. ( cc @jdoerfert @uenoku )