This is an archive of the discontinued LLVM Phabricator instance.

[Attributor][FIX] Do not treat byval args as local memory (for now)
ClosedPublic

Authored by jdoerfert on Aug 16 2021, 9:05 AM.

Details

Summary

For now we do should not treat byval arguments as local copies performed
on the call edge, though, in general we should. To make that happen we
need to teach various passes, e.g., DSE, about the copy effect of a
byval. That would also allow us to mark functions only accessing byval
arguments as readnone again, atguably their acceses have no effect
outside of the function, like accesses to allocas.

Diff Detail

Event Timeline

jdoerfert created this revision.Aug 16 2021, 9:05 AM
jdoerfert requested review of this revision.Aug 16 2021, 9:05 AM
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
mlychkov added inline comments.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
7688
mlychkov added inline comments.Aug 17 2021, 12:19 AM
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
7688

The same typos are in commit message.

kuter accepted this revision.Aug 17 2021, 12:11 PM

LGTM

This revision is now accepted and ready to land.Aug 17 2021, 12:11 PM