diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/MCA/HardwareUnits/LSUnit.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/MCA/HardwareUnits/LSUnit.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/llvm-project/llvm/lib/MCA/HardwareUnits/LSUnit.cpp b/contrib/llvm-project/llvm/lib/MCA/HardwareUnits/LSUnit.cpp index 07be7b077bc9..121d320f10e6 100644 --- a/contrib/llvm-project/llvm/lib/MCA/HardwareUnits/LSUnit.cpp +++ b/contrib/llvm-project/llvm/lib/MCA/HardwareUnits/LSUnit.cpp @@ -68,7 +68,8 @@ void LSUnitBase::dump() const { unsigned LSUnit::dispatch(const InstRef &IR) { const InstrDesc &Desc = IR.getInstruction()->getDesc(); - unsigned IsMemBarrier = Desc.HasSideEffects; + bool IsStoreBarrier = IR.getInstruction()->isAStoreBarrier(); + bool IsLoadBarrier = IR.getInstruction()->isALoadBarrier(); assert((Desc.MayLoad || Desc.MayStore) && "Not a memory operation!"); if (Desc.MayLoad) @@ -111,12 +112,12 @@ unsigned LSUnit::dispatch(const InstRef &IR) { CurrentStoreGroupID = NewGID; - if (IsMemBarrier) + if (IsStoreBarrier) CurrentStoreBarrierGroupID = NewGID; if (Desc.MayLoad) { CurrentLoadGroupID = NewGID; - if (IsMemBarrier) + if (IsLoadBarrier) CurrentLoadBarrierGroupID = NewGID; } @@ -141,7 +142,7 @@ unsigned LSUnit::dispatch(const InstRef &IR) { // However that group has already started execution, so we cannot add // this load to it. bool ShouldCreateANewGroup = - IsMemBarrier || !ImmediateLoadDominator || + IsLoadBarrier || !ImmediateLoadDominator || CurrentLoadBarrierGroupID == ImmediateLoadDominator || ImmediateLoadDominator <= CurrentStoreGroupID || getGroup(ImmediateLoadDominator).isExecuting(); @@ -161,7 +162,7 @@ unsigned LSUnit::dispatch(const InstRef &IR) { } // A load barrier may not pass a previous load or load barrier. - if (IsMemBarrier) { + if (IsLoadBarrier) { if (ImmediateLoadDominator) { MemoryGroup &LoadGroup = getGroup(ImmediateLoadDominator); LLVM_DEBUG(dbgs() << "[LSUnit]: GROUP DEP: (" @@ -181,7 +182,7 @@ unsigned LSUnit::dispatch(const InstRef &IR) { } CurrentLoadGroupID = NewGID; - if (IsMemBarrier) + if (IsLoadBarrier) CurrentLoadBarrierGroupID = NewGID; return NewGID; } |