diff options
author | Kazu Hirata <kazu@google.com> | 2024-06-20 08:20:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 08:20:38 -0700 |
commit | bed2eb64de05d0e1f5a8494e8c0f44b24d41dd18 (patch) | |
tree | 65c3a37554297e168ab3cfb9306f4c511bceb1c3 | |
parent | f1ce6a465d09f9527151f2f36c19072d2091cbaa (diff) | |
download | llvm-bed2eb64de05d0e1f5a8494e8c0f44b24d41dd18.zip llvm-bed2eb64de05d0e1f5a8494e8c0f44b24d41dd18.tar.gz llvm-bed2eb64de05d0e1f5a8494e8c0f44b24d41dd18.tar.bz2 |
[GenericDomTreeConstruction] Use SmallVector (NFC) (#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.
-rw-r--r-- | llvm/include/llvm/Support/GenericDomTreeConstruction.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/GenericDomTreeConstruction.h b/llvm/include/llvm/Support/GenericDomTreeConstruction.h index 29b5f91..a216cd2 100644 --- a/llvm/include/llvm/Support/GenericDomTreeConstruction.h +++ b/llvm/include/llvm/Support/GenericDomTreeConstruction.h @@ -72,7 +72,7 @@ struct SemiNCAInfo { // Number to node mapping is 1-based. Initialize the mapping to start with // a dummy element. - std::vector<NodePtr> NumToNode = {nullptr}; + SmallVector<NodePtr, 64> NumToNode = {nullptr}; DenseMap<NodePtr, InfoRec> NodeToInfo; using UpdateT = typename DomTreeT::UpdateType; |