R600: Proper insert S_WAITCNT instructions
authorTom Stellard <thomas.stellard@amd.com>
Fri, 18 Jan 2013 21:15:53 +0000 (21:15 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 18 Jan 2013 21:15:53 +0000 (21:15 +0000)
commit82d3d4524f2595b2dce617e963b6d67876b4f9ba
tree87c19301345734b36691ce557d6357150007dfc0
parent935a91540b7aa8f29ea48fe2df657db0ce5b7d5d
R600: Proper insert S_WAITCNT instructions

Some instructions like memory reads/writes are executed
asynchronously, so we need to insert S_WAITCNT instructions
to block before accessing their results. Previously we have
just inserted S_WAITCNT instructions after each async
instruction, this patch fixes this and adds a prober
insertion pass.

Patch by: Christian König

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172846 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/AMDGPU.h
lib/Target/R600/AMDGPUTargetMachine.cpp
lib/Target/R600/CMakeLists.txt
lib/Target/R600/SIISelLowering.cpp
lib/Target/R600/SIISelLowering.h
lib/Target/R600/SIInsertWaits.cpp [new file with mode: 0644]
lib/Target/R600/SIInstrInfo.h
lib/Target/R600/SIInstrInfo.td