This is an archive of the discontinued LLVM Phabricator instance.

[DAE] MarkLive in MarkValue(MaybeLive) if any use is live
ClosedPublic

Authored by aeubanks on Sep 29 2020, 10:46 PM.

Details

Summary

While looping through all args or all return values, we may mark a use
of a later iteration as live. Previously when we got to that later value
it would ignore that and continue adding to Uses instead of marking it
live. For example, when looping through arg#0 and arg#1,
MarkValue(arg#0, Live) may cause some use of arg#1 to be live, but
MarkValue(arg#1, MaybeLive) will not notice that and continue adding
into Uses.

Now MarkValue(RA, MaybeLive) will MarkLive(RA) if any use is live.

Fixes PR47444.

Diff Detail

Event Timeline

aeubanks created this revision.Sep 29 2020, 10:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 29 2020, 10:46 PM
aeubanks requested review of this revision.Sep 29 2020, 10:46 PM
aeubanks updated this revision to Diff 295294.Sep 30 2020, 8:16 AM

break out of loop after MarkLive()

This looks good to me, but someone who's more familiar with this code should also take a look.

rnk accepted this revision.Oct 1 2020, 4:55 PM

lgtm

I am not an expert in this pass, but I think I understand it well enough to approve the change. A use may become live after it is added to the MaybeLiveUses list, so the code has to check again later. Something like that, anyway.

This revision is now accepted and ready to land.Oct 1 2020, 4:55 PM
This revision was landed with ongoing or failed builds.Oct 2 2020, 10:56 AM
This revision was automatically updated to reflect the committed changes.