OSDN Git Service

[AMDGPU] Add VGPR copies post regalloc fix pass
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 24 Jan 2017 17:46:17 +0000 (17:46 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 24 Jan 2017 17:46:17 +0000 (17:46 +0000)
commitf4866eec228e14dd6fb632b8f1f6fcf53218fd9b
treec6091cae20b7109be0db3ef52d416e4124051bcd
parent7cbfb6a3173b405e459448b1ba716d3e77438c35
[AMDGPU] Add VGPR copies post regalloc fix pass

Regalloc creates COPY instructions which do not formally use VALU.
That results in v_mov instructions displaced after exec mask modification.
One pass which do it is SIOptimizeExecMasking, but potentially it can be
done by other passes too.

This patch adds a pass immediately after regalloc to add implicit exec
use operand to all VGPR copy instructions.

Differential Revision: https://reviews.llvm.org/D28874

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292956 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPU.h
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/CMakeLists.txt
lib/Target/AMDGPU/SIFixVGPRCopies.cpp [new file with mode: 0644]
test/CodeGen/AMDGPU/fix-vgpr-copies.mir [new file with mode: 0644]