This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Provide easier checkForallReturnedValues functionality
ClosedPublic

Authored by jdoerfert on Aug 4 2019, 5:05 PM.

Details

Summary

So far, whenever one wants to look at returned values, one had to deal
with the AAReturnedValues and potentially with the AAIsDead attribute.
In the same spirit as other checkForAllXXX methods, we add this
functionality now to the Attributor. By adopting the use sites we got
better results when return instructions were dead.

Event Timeline

jdoerfert created this revision.Aug 4 2019, 5:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2019, 5:05 PM

This looks good. Just one comment inlined:

llvm/lib/Transforms/IPO/Attributor.cpp
1001

Shouldn't AANonNullReturned also use A.checkForAllReturnedValuesAndReturnInsts(Pred))?

jdoerfert marked 2 inline comments as done.Aug 7 2019, 2:13 PM
jdoerfert added inline comments.
llvm/lib/Transforms/IPO/Attributor.cpp
1001

It should. I fixed it for the commit.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 7 2019, 3:27 PM
This revision was automatically updated to reflect the committed changes.
jdoerfert marked an inline comment as done.