AMDGPU/SI: Consolidate FLAT patterns
authorTom Stellard <thomas.stellard@amd.com>
Tue, 5 Jan 2016 02:26:37 +0000 (02:26 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 5 Jan 2016 02:26:37 +0000 (02:26 +0000)
commit46850ab55ff0898c7b0c9a18f51a99a093a2ed05
tree87fd78ff2ae16ba71f246355e476a71aa0883f3c
parent1aeaf6cd6373dbf67d3728de0b9f4d2725571b67
AMDGPU/SI: Consolidate FLAT patterns

Summary:
We had to sets of identical FLAT patterns one inside the
HasFlatAddressSpace predicate and one inside the useFlatForGloabl
predicate.  This patch merges these sets into a single pattern
under the isCIVI predicate.

The reason we can remove the predicates is that when MUBUF instructions
are legal, the instruction selector will prefer selecting those over
FLAT instructions because MUBUF patterns have a higher complexity score.
So, in this case having patterns for FLAT instructions will have no effect.

This change also simplifies the process for forcing global address space
loads to use FLAT instructions, since we no only have to disable the
MUBUF patterns instead of having to disable the MUBUF patterns and
enable the FLAT patterns.

Reviewers: arsenm, cfang

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256807 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUInstructions.td
lib/Target/AMDGPU/CIInstructions.td
lib/Target/AMDGPU/SIInstrInfo.td