R600: rework handling of the constants
authorTom Stellard <thomas.stellard@amd.com>
Wed, 23 Jan 2013 02:09:06 +0000 (02:09 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 23 Jan 2013 02:09:06 +0000 (02:09 +0000)
commit9f7818d9bdfce2e9c7a2cbe31490a135aa6d1211
tree31e05a5bfa8a0ff244b3d281a107be0bb71effbb
parentc7e1888d93f4cb2982266986f3af7e99df631fa1
R600: rework handling of the constants

Remove Cxxx registers, add new special register - "ALU_CONST" and new
operand for each alu src - "sel". ALU_CONST is used to designate that the
new operand contains the value to override src.sel, src.kc_bank, src.chan
for constants in the driver.

Patch by: Vadim Girlin

Vincent Lejeune:
  - Use pointers for constants
  - Fold CONST_ADDRESS when possible

Tom Stellard:
  - Give CONSTANT_BUFFER_0 its own address space
  - Use integer types for constant loads

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173222 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
lib/Target/R600/AMDGPU.h
lib/Target/R600/AMDGPUTargetMachine.cpp
lib/Target/R600/AMDIL.h
lib/Target/R600/AMDILISelDAGToDAG.cpp
lib/Target/R600/CMakeLists.txt
lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h
lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
lib/Target/R600/R600Defines.h
lib/Target/R600/R600ISelLowering.cpp
lib/Target/R600/R600ISelLowering.h
lib/Target/R600/R600InstrInfo.cpp
lib/Target/R600/R600Instructions.td
lib/Target/R600/R600LowerConstCopy.cpp [new file with mode: 0644]
lib/Target/R600/R600RegisterInfo.cpp
lib/Target/R600/R600RegisterInfo.td