R600: Simplify handling of private address space
authorTom Stellard <thomas.stellard@amd.com>
Tue, 22 Oct 2013 18:19:10 +0000 (18:19 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 22 Oct 2013 18:19:10 +0000 (18:19 +0000)
commit04c559569f87d755c3f2828a765f5eb7308e6753
treee9d7c6b9c64b995fcca4ed4e6362d93f84854db9
parent34adeaf8b9e82e68d1dc8de916a307143ddd290c
R600: Simplify handling of private address space

The AMDGPUIndirectAddressing pass was previously responsible for
lowering private loads and stores to indirect addressing instructions.
However, this pass was buggy and way too complicated.  The only
advantage it had over the new simplified code was that it saved one
instruction per direct write to private memory.  This optimization
likely has a minimal impact on performance, and we may be able
to duplicate it using some other transformation.

For the private address space, we now:
1. Lower private loads/store to Register(Load|Store) instructions
2. Reserve part of the register file as 'private memory'
3. After regalloc lower the Register(Load|Store) instructions to
   MOV instructions that use indirect addressing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193179 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/Target/R600/AMDGPU.h
lib/Target/R600/AMDGPUIndirectAddressing.cpp [deleted file]
lib/Target/R600/AMDGPUInstrInfo.cpp
lib/Target/R600/AMDGPUInstrInfo.h
lib/Target/R600/AMDGPUTargetMachine.cpp
lib/Target/R600/CMakeLists.txt
lib/Target/R600/R600InstrInfo.cpp
lib/Target/R600/R600InstrInfo.h
lib/Target/R600/R600Packetizer.cpp
lib/Target/R600/R600RegisterInfo.cpp
lib/Target/R600/R600RegisterInfo.td
lib/Target/R600/SIInstrInfo.cpp
lib/Target/R600/SIInstrInfo.h
test/CodeGen/R600/indirect-addressing.ll