This is an archive of the discontinued LLVM Phabricator instance.

Fixing the stack offset functionality
ClosedPublic

Authored by jlpeyton on Jul 13 2015, 2:01 PM.

Details

Reviewers
hfinkel
Summary

The padding variable used for setting a stack offset (from a page boundary) was dead code as pointed out by Hal a while back. This change fixes that by making the pointer a volatile. Also, the stacksize is doubled based of observations of requesting staggered stacksizes. It was seen on some machines that an offset was created during thread creation (before the dummy alloca() of padding) when a staggered stack size (not a multiple of a page) was requested. Because this offset was created before the alloca(), the alloca() would actually eliminate the offset. To avoid this, we added a multiple of two to the stacksize increase. This way, we can then have the stacksize be as large as the user requested, and also retain the stack offset.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton updated this revision to Diff 29604.Jul 13 2015, 2:01 PM
jlpeyton retitled this revision from to Fixing the stack offset functionality.
jlpeyton updated this object.
jlpeyton added a reviewer: hfinkel.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added subscribers: llvm-commits, openmp-commits.
hfinkel accepted this revision.Jul 26 2015, 6:33 AM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jul 26 2015, 6:33 AM
AndreyChurbanov added a subscriber: AndreyChurbanov.

committed svn rev. 244030.