R600/SI: Store constant initializer data in constant memory
authorTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jul 2014 14:01:14 +0000 (14:01 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jul 2014 14:01:14 +0000 (14:01 +0000)
commitb664d47cb06f3cdaaf95387c293e31e650031db0
tree3bf6bb826017eb0777b8f6b4c9aa711bb48cb18e
parentb97240dba8bcf0197ad4938f40adb98c53698831
R600/SI: Store constant initializer data in constant memory

This implements a solution for constant initializers suggested
by Vadim Girlin, where we store the data after the shader code
and then use the S_GETPC instruction to compute its address.

This saves use the trouble of creating a new buffer for constant data
and then having to pass the pointer to the kernel via user SGPRs or the
input buffer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213530 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
lib/Target/R600/AMDGPU.h
lib/Target/R600/AMDGPUAsmPrinter.cpp
lib/Target/R600/AMDGPUAsmPrinter.h
lib/Target/R600/AMDGPUISelLowering.cpp
lib/Target/R600/AMDGPUISelLowering.h
lib/Target/R600/AMDGPUMCInstLower.cpp
lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp
lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp
lib/Target/R600/MCTargetDesc/AMDGPUFixupKinds.h
lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
lib/Target/R600/R600ISelLowering.cpp
lib/Target/R600/SIISelLowering.cpp
lib/Target/R600/SIISelLowering.h
lib/Target/R600/SIInstrInfo.cpp
lib/Target/R600/SIInstrInfo.td
lib/Target/R600/SIInstructions.td
test/CodeGen/R600/gv-const-addrspace.ll
test/CodeGen/R600/large-constant-initializer.ll