Skip to content

Commit

Permalink
[RISCV] Remove Name and OverloadedName from RVVIntrinsicDef. NFC (#74907
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
topperc committed Dec 9, 2023
1 parent 7a13e41 commit 84b907d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions clang/lib/Sema/SemaRISCVVectorLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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});
Expand Down

0 comments on commit 84b907d

Please sign in to comment.