[clang] 84b907d - [RISCV] Remove Name and OverloadedName from RVVIntrinsicDef. NFC (#74907)

via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 9 11:32:23 PST 2023


Author: Craig Topper
Date: 2023-12-09T11:32:19-08:00
New Revision: 84b907d217776efcfca5c7d2cce7b279f09265a6

URL: https://github.com/llvm/llvm-project/commit/84b907d217776efcfca5c7d2cce7b279f09265a6
DIFF: https://github.com/llvm/llvm-project/commit/84b907d217776efcfca5c7d2cce7b279f09265a6.diff

LOG: [RISCV] Remove Name and OverloadedName from RVVIntrinsicDef. NFC (#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.

Added: 
    

Modified: 
    clang/lib/Sema/SemaRISCVVectorLookup.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaRISCVVectorLookup.cpp b/clang/lib/Sema/SemaRISCVVectorLookup.cpp
index 9a5aecf669a07..0d411fca0f9c8 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