[clang] [RISCV] Remove Name and OverloadedName from RVVIntrinsicDef. NFC (PR #74907)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 17:21:20 PST 2023
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/74907
These names are never used so just waste a lot of memory. If do need them ever, it would be better to store pointers to the StringMapEntry objects that store the same strings.
>From 776adf52c610904938e966503eb02bc84b7b5e18 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Fri, 8 Dec 2023 17:18:54 -0800
Subject: [PATCH] [RISCV] Remove Name and OverloadedName from RVVIntrinsicDef.
NFC
These names are never used so just waste a lot of memory. If do
need them ever, it would be better to store pointers to the
StringMapEntry objects that store the same strings.
---
clang/lib/Sema/SemaRISCVVectorLookup.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/clang/lib/Sema/SemaRISCVVectorLookup.cpp b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
index 9a5aecf669a07d..0d411fca0f9c82 100644
--- a/clang/lib/Sema/SemaRISCVVectorLookup.cpp
+++ b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
@@ -34,12 +34,6 @@ namespace {
// Function definition of a RVV intrinsic.
struct RVVIntrinsicDef {
- /// Full function name with suffix, e.g. vadd_vv_i32m1.
- std::string Name;
-
- /// Overloaded function name, e.g. vadd.
- std::string OverloadName;
-
/// Mapping to which clang built-in function, e.g. __builtin_rvv_vadd.
std::string BuiltinName;
@@ -393,7 +387,7 @@ void RISCVIntrinsicManagerImpl::InitRVVIntrinsic(
// Put into IntrinsicList.
size_t Index = IntrinsicList.size();
- IntrinsicList.push_back({Name, OverloadedName, BuiltinName, Signature});
+ IntrinsicList.push_back({BuiltinName, Signature});
// Creating mapping to Intrinsics.
Intrinsics.insert({Name, Index});
More information about the cfe-commits
mailing list