diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-29 01:26:21 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-29 01:26:21 +0000 |
| commit | 9608a2891d51b2e08fa6a0c36931e4be423ad6f1 (patch) | |
| tree | 9ff4249638196f4884375631a5cb990d2f347962 /llvm/lib/Target/AMDGPU/SIInstrInfo.h | |
| parent | dc8f5cc39c5277d600ea2a1e076f5bb37fab246a (diff) | |
| download | bcm5719-llvm-9608a2891d51b2e08fa6a0c36931e4be423ad6f1.tar.gz bcm5719-llvm-9608a2891d51b2e08fa6a0c36931e4be423ad6f1.zip | |
AMDGPU: Make areMemAccessesTriviallyDisjoint more aware of segment flat
Checking the encoding is insufficient since now there can
be global or scratch instructions.
llvm-svn: 309472
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIInstrInfo.h')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstrInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.h b/llvm/lib/Target/AMDGPU/SIInstrInfo.h index 57a5133e0ed..0dbe080bf6b 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.h +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.h @@ -420,6 +420,14 @@ public: return MI.getDesc().TSFlags & SIInstrFlags::FLAT; } + // Is a FLAT encoded instruction which accesses a specific segment, + // i.e. global_* or scratch_*. + static bool isSegmentSpecificFLAT(const MachineInstr &MI) { + auto Flags = MI.getDesc().TSFlags; + return (Flags & SIInstrFlags::FLAT) && !(Flags & SIInstrFlags::LGKM_CNT); + } + + // Any FLAT encoded instruction, including global_* and scratch_*. bool isFLAT(uint16_t Opcode) const { return get(Opcode).TSFlags & SIInstrFlags::FLAT; } |

