Skip to content

Commit 2347838

Browse files
committed
fixup! [MCA] Do not allocate space for DependenceEdge by default in DependencyGraphNode (NFC)
1 parent 7714544 commit 2347838

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/tools/llvm-mca/Views/BottleneckAnalysis.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ class DependencyGraph {
228228
unsigned Depth;
229229

230230
DependencyEdge CriticalPredecessor;
231+
// Measurements show that more than 90% of nodes have no outgoing edges. To
232+
// minimize memory consumption we use SmallVector with zero inline elements
233+
// that is preferred version of std::vector.
231234
SmallVector<DependencyEdge, 0> OutgoingEdges;
232235
};
233236
SmallVector<DGNode, 16> Nodes;

0 commit comments

Comments
 (0)