This is an archive of the discontinued LLVM Phabricator instance.

Enforce StackID definition in PEI
ClosedPublic

Authored by sdesmalen on Apr 1 2019, 5:45 AM.

Details

Summary

There are various places in LLVM where the definition of StackID is not
properly honoured, for example in PEI where objects with a StackID > 0 are
allocated on the default stack (StackID0). This patch enforces that PEI
only considers allocating objects to StackID 0.

Diff Detail

Event Timeline

sdesmalen created this revision.Apr 1 2019, 5:45 AM
arsenm added inline comments.Apr 1 2019, 11:49 AM
lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
295–299

I'm curious how you ended up finding this?

arsenm accepted this revision.Apr 1 2019, 11:57 AM

LGTM

This revision is now accepted and ready to land.Apr 1 2019, 11:57 AM
sdesmalen marked an inline comment as done.Apr 2 2019, 2:42 AM

Thanks!

lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
295–299

Without this change I ended up with several unit test failures:

LLVM :: CodeGen/AMDGPU/control-flow-fastregalloc.ll
LLVM :: CodeGen/AMDGPU/si-spill-sgpr-stack.ll
LLVM :: CodeGen/AMDGPU/spill-m0.ll
LLVM :: CodeGen/AMDGPU/spill-wide-sgpr.ll
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2019, 2:47 AM