This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Make liveness "edge-based"
ClosedPublic

Authored by jdoerfert on Oct 29 2019, 10:54 PM.

Details

Summary

If control is transferred to a successor is the key question when it
comes to liveness. The new implementation puts that question in the
focus and thereby providing a clean way to assume certain CFG edges are
dead or instructions will not transfer control.

Event Timeline

jdoerfert created this revision.Oct 29 2019, 10:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2019, 10:54 PM
sstefan1 accepted this revision.Oct 30 2019, 7:40 AM

LGTM with minor comments.

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

Maybe change NRC as well. It doesn't have real meaning after this rewrite.

2481

This doesn't seem to be used anymore.

2494

Just to make sure I understand this correctly. This is looking at callbr instruction and only looking at normal label? Shouldn't it look at other labels as well?

This revision is now accepted and ready to land.Oct 30 2019, 7:40 AM
uenoku added inline comments.Oct 30 2019, 8:44 AM
llvm/test/Transforms/FunctionAttrs/nonnull.ll
219

Why are these readonly removed?

jdoerfert marked 4 inline comments as done.Oct 30 2019, 10:54 AM
jdoerfert added inline comments.
llvm/lib/Transforms/IPO/Attributor.cpp
2314

Agreed, will do.

2481

yes.

2494

This is not called for callbr because of what you say. Only CallInst and InvokeInst end up here and the latter has some additional handling below.

llvm/test/Transforms/FunctionAttrs/nonnull.ll
219

they are not explicitly queries and now also not implicitly anymore. The information is not lost though. Maybe we want to add AAMemBehavior and others to *all* locations they are not seeded at the moment.

This revision was automatically updated to reflect the committed changes.