diff --git a/llvm/tools/llvm-mca/Views/BottleneckAnalysis.h b/llvm/tools/llvm-mca/Views/BottleneckAnalysis.h index 529090cf543fc..d4c07f521e6b1 100644 --- a/llvm/tools/llvm-mca/Views/BottleneckAnalysis.h +++ b/llvm/tools/llvm-mca/Views/BottleneckAnalysis.h @@ -228,7 +228,10 @@ class DependencyGraph { unsigned Depth; DependencyEdge CriticalPredecessor; - SmallVector OutgoingEdges; + // Measurements show that more than 90% of nodes have no outgoing edges. To + // minimize memory consumption we use SmallVector with zero inline elements + // that is preferred version of std::vector. + SmallVector OutgoingEdges; }; SmallVector Nodes;