[clang] [RISCV][clang] Optimize memory usage of intrinsic lookup table (PR #77487)

Brandon Wu via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 14 23:36:16 PST 2024


================
@@ -463,7 +464,7 @@ void RISCVIntrinsicManagerImpl::CreateRVVIntrinsicDecl(LookupResult &LR,
 bool RISCVIntrinsicManagerImpl::CreateIntrinsicIfFound(LookupResult &LR,
                                                        IdentifierInfo *II,
                                                        Preprocessor &PP) {
-  StringRef Name = II->getName();
+  StringRef Name = II->getName().substr(8);
----------------
4vtomat wrote:

We can't add an assertion since other tokens go through this function too, or can we filter out the token?

https://github.com/llvm/llvm-project/pull/77487


More information about the cfe-commits mailing list