This is an archive of the discontinued LLVM Phabricator instance.

[MSSA] Fix PR28880 by fixing stack popping behavior.
ClosedPublic

Authored by dberlin on Aug 6 2016, 9:16 AM.

Details

Summary

In the use optimizer, we need to keep track of the stack size after popping off dominating accesses, or else we may decide a lower bound is still valid when it is not due to
intervening pushes.
Fixes PR28880 (and probably a bunch of other things).

Diff Detail

Repository
rL LLVM

Event Timeline

dberlin updated this revision to Diff 67075.Aug 6 2016, 9:16 AM
dberlin retitled this revision from to [MSSA] Fix PR28880 by fixing stack popping behavior..
dberlin updated this object.
dberlin added a reviewer: george.burgess.iv.
dberlin added subscribers: sebpop, llvm-commits, MatzeB.
sebpop added a comment.Aug 6 2016, 9:56 AM

LGTM.
Let's enable gvn-hoist back again once this is committed.

test/Transforms/Util/MemorySSA/pr28880.ll
54 ↗(On Diff #67075)

You may want to remove all these attributes.

dberlin updated this revision to Diff 67088.Aug 6 2016, 3:44 PM
  • Update to check domination of lower bound
sebpop added a comment.Aug 6 2016, 4:00 PM

You may want to add the testcases you were speaking about that break the logic of checking the stack size.

george.burgess.iv accepted this revision.Aug 6 2016, 4:55 PM
george.burgess.iv edited edge metadata.

Ooh, tricky. LGTM with sebpop's comment addressed; I'm fine if the stack size test cases are committed later. Thanks for the patch!

I'll see what I can do to add EXPENSIVE_CHECKS to the use optimizer (like the ones we have in the walker). :)

This revision is now accepted and ready to land.Aug 6 2016, 4:55 PM
This revision was automatically updated to reflect the committed changes.