Different BTI buffer may point to the same memory. Let's not change the load/store sequence. This fix a regression at the opencv test suite OCL_Channels/MixChannels.Accuracy/8.
This reverts commit 435f63e9fde93c38331bf0231df5ee8625f88a62. Singed-off-by: Zhigang Gong <[email protected]> --- backend/src/backend/gen_insn_scheduling.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/backend/src/backend/gen_insn_scheduling.cpp b/backend/src/backend/gen_insn_scheduling.cpp index 4324206..106d608 100644 --- a/backend/src/backend/gen_insn_scheduling.cpp +++ b/backend/src/backend/gen_insn_scheduling.cpp @@ -137,9 +137,9 @@ namespace gbe /*! To track loads and stores */ enum GenMemory : uint8_t { GLOBAL_MEMORY = 0, - LOCAL_MEMORY = GLOBAL_MEMORY + 128, + LOCAL_MEMORY, SCRATCH_MEMORY, - MAX_MEM_SYSTEM + MAX_MEM_SYSTEM }; /*! Do we allocate after or before the register allocation? */ @@ -349,15 +349,7 @@ namespace gbe uint32_t DependencyTracker::getIndex(uint32_t bti) const { const uint32_t memDelta = grfNum + MAX_FLAG_REGISTER + MAX_ACC_REGISTER; - uint32_t memIndex; - if (bti == 0xfe) - memIndex = LOCAL_MEMORY; - else if (bti == 0xff) - memIndex = SCRATCH_MEMORY; - else { - memIndex = GLOBAL_MEMORY + (bti % 128); - } - return memDelta + memIndex; + return bti == 0xfe ? memDelta + LOCAL_MEMORY : (bti == 0xff ? memDelta + SCRATCH_MEMORY : memDelta + GLOBAL_MEMORY); } void DependencyTracker::updateWrites(ScheduleDAGNode *node) { -- 1.8.3.2 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
