R600: Support for indirect addressing v4
authorTom Stellard <thomas.stellard@amd.com>
Wed, 6 Feb 2013 17:32:29 +0000 (17:32 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 6 Feb 2013 17:32:29 +0000 (17:32 +0000)
commitc0b0c677a1138f0a5ce1435fc1e70cef38fd95c8
tree5a26b0188a78ccaa460517114fd3b7b28f260db1
parent8a06229c89f848bf742e2b88423d02558b7ca638
R600: Support for indirect addressing v4

Only implemented for R600 so far.  SI is missing implementations of a
few callbacks used by the Indirect Addressing pass and needs code to
handle frame indices.

At the moment R600 only supports array sizes of 16 dwords or less.
Register packing of vector types is currently disabled, which means that a
vec4 is stored in T0_X, T1_X, T2_X, T3_X, rather than T0_XYZW. In order
to correctly pack registers in all cases, we will need to implement an
analysis pass for R600 that determines the correct vector width for each
array.

v2:
  - Add support for i8 zext load from stack.
  - Coding style fixes

v3:
  - Don't reserve registers for indirect addressing when it isn't
    being used.
  - Fix bug caused by LLVM limiting the number of SubRegIndex
    declarations.

v4:
  - Fix 64-bit defines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174525 91177308-0d34-0410-b5e6-96231b3b80d8
31 files changed:
lib/Target/R600/AMDGPU.h
lib/Target/R600/AMDGPUFrameLowering.cpp [new file with mode: 0644]
lib/Target/R600/AMDGPUFrameLowering.h [new file with mode: 0644]
lib/Target/R600/AMDGPUISelLowering.cpp
lib/Target/R600/AMDGPUISelLowering.h
lib/Target/R600/AMDGPUIndirectAddressing.cpp [new file with mode: 0644]
lib/Target/R600/AMDGPUInstrInfo.cpp
lib/Target/R600/AMDGPUInstrInfo.h
lib/Target/R600/AMDGPUInstrInfo.td
lib/Target/R600/AMDGPUInstructions.td
lib/Target/R600/AMDGPURegisterInfo.cpp
lib/Target/R600/AMDGPURegisterInfo.h
lib/Target/R600/AMDGPURegisterInfo.td
lib/Target/R600/AMDGPUTargetMachine.cpp
lib/Target/R600/AMDGPUTargetMachine.h
lib/Target/R600/AMDILFrameLowering.cpp [deleted file]
lib/Target/R600/AMDILFrameLowering.h [deleted file]
lib/Target/R600/AMDILISelDAGToDAG.cpp
lib/Target/R600/CMakeLists.txt
lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp
lib/Target/R600/R600Defines.h
lib/Target/R600/R600ISelLowering.cpp
lib/Target/R600/R600ISelLowering.h
lib/Target/R600/R600InstrInfo.cpp
lib/Target/R600/R600InstrInfo.h
lib/Target/R600/R600Instructions.td
lib/Target/R600/R600MachineFunctionInfo.h
lib/Target/R600/R600RegisterInfo.cpp
lib/Target/R600/R600RegisterInfo.td
lib/Target/R600/SIInstrInfo.cpp
lib/Target/R600/SIInstrInfo.h