This is an archive of the discontinued LLVM Phabricator instance.

Conservative fix for DSE across loops
Needs RevisionPublic

Authored by DefCon42 on Jan 30 2020, 5:57 PM.

Details

Reviewers
asbirlea
Summary

This is essentially just https://reviews.llvm.org/D68006 with a few fixes for the comments.

To address the last comment about the CFG visiting: This simply prevents DSE from analyzing through back-edges (and instead assuming memory modification) because it had the potential to break certain types of loops. I heard somewhere that there will be a proper fix for this in @fhahn 's MemorySSA-backed DSE, so this is essentially a band-aid I suppose.

Don't know who to tag for this, sorry.

Diff Detail

Event Timeline

DefCon42 created this revision.Jan 30 2020, 5:57 PM
DefCon42 abandoned this revision.Jan 30 2020, 6:04 PM

Looks like @fhahn posted a proper fix for this almost at the exact same time that I posted this one. Heh.

fhahn added a comment.Jan 30 2020, 6:13 PM

Looks like @fhahn posted a proper fix for this almost at the exact same time that I posted this one. Heh.

If the MemorySSA-backed DSE lands, I expect it to take at least a few months until it will be mature enough. IMO we should fix the issue in the current DSE regardless of any MemorySSA based work.

DefCon42 reclaimed this revision.Jan 30 2020, 6:18 PM

Looks like I missed the fact that that *was* for MemorySSA-backed DSE. oops :^)
Guess I'm reopening this, but again this is essentially a band-aid.

asbirlea requested changes to this revision.Jan 31 2020, 9:42 AM

Does @test31 in test/Transforms/DeadStoreElimination/simple.ll pass with this patch?

Can you add the test from PR44704?

This revision now requires changes to proceed.Jan 31 2020, 9:42 AM