This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Introduce a helper function to deal with undef + none
ClosedPublic

Authored by jdoerfert on Jun 7 2021, 4:55 PM.

Details

Summary

We often need to deal with the value lattice that contains none and
undef as special values. A simple helper makes this much nicer.

Diff Detail

Event Timeline

jdoerfert created this revision.Jun 7 2021, 4:55 PM
jdoerfert requested review of this revision.Jun 7 2021, 4:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2021, 4:55 PM
Herald added a subscriber: bbn. · View Herald Transcript
ormris removed a subscriber: ormris.Jun 11 2021, 2:56 PM
kuter added inline comments.Jun 18 2021, 6:06 PM
llvm/test/Transforms/Attributor/nocapture-2.ll
214

why is returned missing here ?

jdoerfert added inline comments.Jun 20 2021, 1:41 PM
llvm/test/Transforms/Attributor/nocapture-2.ll
214

Idk. I'll take a look.

jdoerfert added inline comments.Jun 22 2021, 2:48 PM
llvm/test/Transforms/Attributor/nocapture-2.ll
214

I'd suggest that we look into this after D103860 landed. A lot of the aareturnedvalue handling is going away with that one. The gist here is that we can now look through the casts in scc_A, scc_B, and scc_C and therefore follow the returned call through the argument. This confuses the "unique return" logic.

kuter accepted this revision.Jul 6 2021, 7:25 PM

LGTM

This revision is now accepted and ready to land.Jul 6 2021, 7:25 PM