Lines Matching +full:low +full:- +full:cost
1 //===--------------------- BottleneckAnalysis.cpp ---------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 //===----------------------------------------------------------------------===//
23 #define DEBUG_TYPE "llvm-mca"
80 uint64_t Current = CumulativeMask & (-CumulativeMask); in updateResourcePressureDistribution()
93 uint64_t SubUnit = Mask & (-Mask); in updateResourcePressureDistribution()
156 OS << " - REGISTER: "; in dumpDependencyEdge()
159 OS << " - MEMORY"; in dumpDependencyEdge()
163 OS << " - RESOURCE MASK: " << DE.ResourceOrRegID; in dumpDependencyEdge()
165 OS << " - COST: " << DE.Cost << '\n'; in dumpDependencyEdge()
173 // Use a cut-off threshold to prune edges with a low frequency. in pruneEdges()
181 Nodes[Edge.ToIID].NumPredecessors--; in pruneEdges()
182 std::swap(Edge, N.OutgoingEdges[E - 1]); in pruneEdges()
183 --E; in pruneEdges()
188 N.OutgoingEdges.resize(Size - NumPruned); in pruneEdges()
209 // Each node of the graph starts with an initial default cost of zero. The in propagateThroughEdges()
210 // cost of a node is a measure of criticality: the higher the cost, the bigger in propagateThroughEdges()
212 // For register and memory dependencies, the cost is a function of the write in propagateThroughEdges()
214 // For processor resource dependencies, the cost is a function of the resource in propagateThroughEdges()
215 // pressure. Resource interferences with low frequency values are ignored. in propagateThroughEdges()
219 // nodes`, and then propagates the cost of N to all its neighbors. in propagateThroughEdges()
241 uint64_t Cost = N.Cost + DepEdge.Dep.Cost; in propagateThroughEdges() local
243 // case, update the total cost of the destination node (ToIID), as well in propagateThroughEdges()
245 if (Cost > To.Cost) { in propagateThroughEdges()
247 To.Cost = Cost; in propagateThroughEdges()
266 // Identify the node N with the highest cost in the graph. By construction, in getCriticalSequence()
275 return Lhs.Cost < Rhs.Cost; in getCriticalSequence()
325 FOS << "\n +----< " << FromIID << "."; in printCriticalSequence()
335 FOS << "\n +----< " << CurrentIID << "."; in printCriticalSequence()
341 ToIID = DE->ToIID % Source.size(); in printCriticalSequence()
351 FOS << "\n +----> " << ToIID << "."; in printCriticalSequence()
355 << "\n +----> " << ToIID << "."; in printCriticalSequence()
360 const DependencyEdge::Dependency &Dep = DE->Dep; in printCriticalSequence()
382 FOS << " [ probability: " << ((DE->Frequency * 100) / Iterations) in printCriticalSequence()
433 It->Dep.Cost += Dep.Cost; in addDependency()
434 It->Frequency++; in addDependency()
454 unsigned RegID, unsigned Cost) { in addRegisterDep() argument
458 DG.addRegisterDep(From, To + SourceSize, RegID, Cost); in addRegisterDep()
459 DG.addRegisterDep(From + SourceSize, To + (SourceSize * 2), RegID, Cost); in addRegisterDep()
462 DG.addRegisterDep(From + SourceSize, To + SourceSize, RegID, Cost); in addRegisterDep()
466 unsigned Cost) { in addMemoryDep() argument
470 DG.addMemoryDep(From, To + SourceSize, Cost); in addMemoryDep()
471 DG.addMemoryDep(From + SourceSize, To + (SourceSize * 2), Cost); in addMemoryDep()
474 DG.addMemoryDep(From + SourceSize, To + SourceSize, Cost); in addMemoryDep()
478 uint64_t Mask, unsigned Cost) { in addResourceDep() argument
482 DG.addResourceDep(From, To + SourceSize, Mask, Cost); in addResourceDep()
483 DG.addResourceDep(From + SourceSize, To + (SourceSize * 2), Mask, Cost); in addResourceDep()
486 DG.addResourceDep(From + SourceSize, To + SourceSize, Mask, Cost); in addResourceDep()
511 uint64_t Current = ResourceMask & (-ResourceMask); in onEvent()
537 if (IID == ((Iterations * Source.size()) - 1)) in onEvent()
619 OS << "\n - " << PRDesc.Name << " [ " in printBottleneckHints()
627 OS << "\n - Register Dependencies [ " in printBottleneckHints()
630 OS << "\n - Memory Dependencies [ " in printBottleneckHints()