Skip to content

Commit 4411a03

Browse files
kazutakahirataAlexisPerry
authored andcommitted
[GenericDomTreeConstruction] Use SmallVector (NFC) (llvm#96138)
The use of SmallVector here saves 4.7% of heap allocations during the compilation of ConvertExpr.cpp.ii, a preprocessed version of flang/lib/Lower/ConvertExpr.cpp.
1 parent c41a647 commit 4411a03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Support/GenericDomTreeConstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct SemiNCAInfo {
7272

7373
// Number to node mapping is 1-based. Initialize the mapping to start with
7474
// a dummy element.
75-
std::vector<NodePtr> NumToNode = {nullptr};
75+
SmallVector<NodePtr, 64> NumToNode = {nullptr};
7676
DenseMap<NodePtr, InfoRec> NodeToInfo;
7777

7878
using UpdateT = typename DomTreeT::UpdateType;

0 commit comments

Comments
 (0)