HomePhabricator

AMDGPU: Handle frame index expansion with no free SGPRs pre gfx9

Authored by arsenm on Sep 4 2019, 10:12 AM.

Description

AMDGPU: Handle frame index expansion with no free SGPRs pre gfx9

Since an add instruction must produce an unused carry out, this
requires additional SGPRs. This can be avoided by keeping the entire
offset computation in SGPRs. If one SGPR is still available, this only
costs one extra mov. If none are available, the entire computation can
be done in place and reversed.

This does assume the use is a VGPR operand. This was already assumed,
and we currently only select frame indexes to VALU instructions. This
should probably be fixed at some point to handle more possible MIR.

llvm-svn: 370929

Details

Committed
arsenmSep 4 2019, 10:12 AM
Parents
rGe6b26f2f91a3: Avoid assemble step in verbose-output-quoting.c
Branches
Unknown
Tags
Unknown