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)
commit067c81567bf35e04b2c9b3d360a6f15dedbfe8aa
tree1031a76ce68e6100ccade83f3b1ccc15cf2ecba5
parentb2114caf627f38eaa7905d3ad911971206b1caa9
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.

llvm-svn: 213530
18 files changed:
llvm/lib/Target/R600/AMDGPU.h
llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
llvm/lib/Target/R600/AMDGPUAsmPrinter.h
llvm/lib/Target/R600/AMDGPUISelLowering.cpp
llvm/lib/Target/R600/AMDGPUISelLowering.h
llvm/lib/Target/R600/AMDGPUMCInstLower.cpp
llvm/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp
llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp
llvm/lib/Target/R600/MCTargetDesc/AMDGPUFixupKinds.h
llvm/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp
llvm/lib/Target/R600/R600ISelLowering.cpp
llvm/lib/Target/R600/SIISelLowering.cpp
llvm/lib/Target/R600/SIISelLowering.h
llvm/lib/Target/R600/SIInstrInfo.cpp
llvm/lib/Target/R600/SIInstrInfo.td
llvm/lib/Target/R600/SIInstructions.td
llvm/test/CodeGen/R600/gv-const-addrspace.ll
llvm/test/CodeGen/R600/large-constant-initializer.ll