From: Matt Arsenault Date: Tue, 8 Sep 2015 19:54:32 +0000 (+0000) Subject: AMDGPU: Mark s_barrier as a high latency instruction X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=55ec9f281ce3348a1a08792d96a34034ab19442d;p=oota-llvm.git AMDGPU: Mark s_barrier as a high latency instruction These were marked as WriteSALU, which is low latency. I'm guessing at the value to use, but it should probably be considered the highest latency instruction. I'm not sure this has any actual effect since hasSideEffects probably is preventing any moving of these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247060 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td index b041c394bd7..c3835411d38 100644 --- a/lib/Target/AMDGPU/SIInstructions.td +++ b/lib/Target/AMDGPU/SIInstructions.td @@ -479,6 +479,7 @@ let hasSideEffects = 1 in { def S_BARRIER : SOPP <0x0000000a, (ins), "s_barrier", [(int_AMDGPU_barrier_local)] > { + let SchedRW = [WriteBarrier]; let simm16 = 0; let mayLoad = 1; let mayStore = 1; diff --git a/lib/Target/AMDGPU/SISchedule.td b/lib/Target/AMDGPU/SISchedule.td index 9b1f676020b..da7601492f9 100644 --- a/lib/Target/AMDGPU/SISchedule.td +++ b/lib/Target/AMDGPU/SISchedule.td @@ -17,6 +17,7 @@ def WriteLDS : SchedWrite; def WriteSALU : SchedWrite; def WriteSMEM : SchedWrite; def WriteVMEM : SchedWrite; +def WriteBarrier : SchedWrite; // Vector ALU instructions def Write32Bit : SchedWrite; @@ -64,6 +65,7 @@ multiclass SICommonWriteRes { def : HWWriteRes; def : HWWriteRes; // XXX: Guessed ??? def : HWWriteRes; // 300 - 600 + def : HWWriteRes; // XXX: Guessed ??? def : HWVALUWriteRes; def : HWVALUWriteRes;