This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Stop modifying SP in call sequences
ClosedPublic

Authored by arsenm on Sep 13 2017, 6:00 PM.

Details

Reviewers
rampitec
Summary

Because the stack growth direction and addressing is done
in the same direction, modifying SP at the beginning of the
call sequence was incorrect. If we had a stack passed argument,
we would end up skipping that number of bytes before pushing
arguments, leaving unused/inconsistent space.

The callee creates fixed stack objects in its frame, so
the space necessary for these is already logically allocated
in the callee, so we just let the callee increment SP if
it really requires it.

Diff Detail

Event Timeline

arsenm created this revision.Sep 13 2017, 6:00 PM
This revision is now accepted and ready to land.Sep 14 2017, 8:49 AM
arsenm closed this revision.Sep 14 2017, 10:39 AM

r313279