This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Add new target attribute InitialPSInputAddr
ClosedPublic

Authored by mareko on Jan 9 2016, 3:26 PM.

Details

Summary

This allows Mesa to pass initial SPI_PS_INPUT_ADDR to LLVM.
The register assigns VGPR locations to PS inputs, while the ENA register
determines whether or not they are loaded.

Mesa needs to set some inputs as not-movable, so that a pixel shader prolog
binary appended at the beginning can assume where some inputs are.

v2: Make PSInputAddr private, because there is never enough silly getters

and setters for people to read.

Diff Detail

Repository
rL LLVM

Event Timeline

mareko updated this revision to Diff 44408.Jan 9 2016, 3:26 PM
mareko retitled this revision from to AMDGPU/SI: Add new target attribute InitialPSInputAddr.
mareko updated this object.
mareko added reviewers: tstellarAMD, arsenm.

There should be some lit tests for this.

tstellarAMD requested changes to this revision.Jan 11 2016, 8:01 AM
tstellarAMD edited edge metadata.
This revision now requires changes to proceed.Jan 11 2016, 8:01 AM

There should be some lit tests for this.

Hi, there is a separate patch that contains tests for all commits (this one, return values, bugs). All things need to be in place for the tests to pass:
http://reviews.llvm.org/D16036

tstellarAMD accepted this revision.Jan 12 2016, 8:12 AM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jan 12 2016, 8:12 AM
This revision was automatically updated to reflect the committed changes.
arsenm added inline comments.Jan 13 2016, 5:50 PM
llvm/trunk/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
129

This should follow the normal attribute naming convention of lowercase separated with -s, and preferably have an amdgpu- prefix