[llvm] [TableGen] Don't use inline storage for ReferenceLocs (NFC) (PR #125231)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 06:26:02 PST 2025
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/125231
The ReferenceLocs are not enabled by default (they are used by the tablegen lsp server), and as such always empty, but still allocate inline storage for the SmallVector. Disabling it saves about 200MB on RISCVGenGlobalISel.inc.
(The equivalent field in Record already disables inline storage.)
>From 7bed06eb37faccdd2057d28c52d01adebb310ff9 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Fri, 31 Jan 2025 15:20:32 +0100
Subject: [PATCH] [TableGen] Don't use inline storage for ReferenceLocs (NFC)
The ReferenceLocs are not enabled by default (they are used by the
tablegen lsp server), and as such always empty, but still allocate
inline storage for the SmallVector. Disabling it saves about 200MB
on RISCVGenGlobalISel.inc.
(The equivalent field in Record already disables inline storage.)
---
llvm/include/llvm/TableGen/Record.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/TableGen/Record.h b/llvm/include/llvm/TableGen/Record.h
index d9930a48e80840..e04ed348231487 100644
--- a/llvm/include/llvm/TableGen/Record.h
+++ b/llvm/include/llvm/TableGen/Record.h
@@ -1523,7 +1523,7 @@ class RecordVal {
bool IsUsed = false;
/// Reference locations to this record value.
- SmallVector<SMRange> ReferenceLocs;
+ SmallVector<SMRange, 0> ReferenceLocs;
public:
RecordVal(const Init *N, const RecTy *T, FieldKind K);
More information about the llvm-commits
mailing list