This is an archive of the discontinued LLVM Phabricator instance.

[WebAssemly] Don't move calls or stores past intervening loads
ClosedPublic

Authored by dschuff on Feb 16 2016, 10:41 AM.

Details

Summary

The register stackifier currently checks for intervening stores (and
loads that may alias them) but doesn't account for the fact that the
instruction being moved may affect intervening loads.

Diff Detail

Repository
rL LLVM

Event Timeline

dschuff updated this revision to Diff 48084.Feb 16 2016, 10:41 AM
dschuff retitled this revision from to [WebAssemly] Don't move calls or stores past intervening loads.
dschuff updated this object.
dschuff added reviewers: sunfish, jfb.
dschuff added a subscriber: llvm-commits.
sunfish accepted this revision.Feb 16 2016, 12:41 PM
sunfish edited edge metadata.

Good catch. The isSafeToMove API is pretty confusing; this is what comes of trying to be clever with it. I think we'll eventually want to revisit this code and do something other than isSafeToMove, but this change looks ok for now.

This revision is now accepted and ready to land.Feb 16 2016, 12:41 PM
This revision was automatically updated to reflect the committed changes.