This is an archive of the discontinued LLVM Phabricator instance.

IR: Have byref imply dereferenceable
ClosedPublic

Authored by arsenm on Sep 23 2020, 10:05 AM.

Details

Summary

The langref already states it does, but this wasn't implemented. Also
covers inalloca and preallocated. Also helps fix a dependence on
pointer element types.

Diff Detail

Event Timeline

arsenm created this revision.Sep 23 2020, 10:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2020, 10:05 AM
arsenm requested review of this revision.Sep 23 2020, 10:05 AM
jdoerfert accepted this revision.Sep 23 2020, 10:11 AM

LGTM, one minor request.

llvm/test/Transforms/Attributor/value-simplify.ll
355

ups. Could you maybe repair the tests to avoid UB here?

This revision is now accepted and ready to land.Sep 23 2020, 10:11 AM
arsenm added inline comments.Sep 24 2020, 6:47 AM
llvm/test/Transforms/Attributor/value-simplify.ll
355

I'm not sure what this is trying to test exactly. What argument should this pass instead?

arsenm closed this revision.Sep 24 2020, 6:57 AM
llvm/test/Transforms/Attributor/value-simplify.ll
355

Just forwarding an argument seems to have worked

jdoerfert added inline comments.Sep 24 2020, 7:00 AM
llvm/test/Transforms/Attributor/value-simplify.ll
355

Add an argument and pass it along so this is not UB. The test checks we do not do anything invalid with a complicated argument (here inalloca)