[llvm] [SVE] Don't require lookup when demangling vector function mappings (PR #72260)
Maciej Gabka via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 09:57:00 PST 2023
================
@@ -1466,15 +1466,12 @@ void VFABI::getVectorVariantNames(
S.split(ListAttr, ",");
for (const auto &S : SetVector<StringRef>(ListAttr.begin(), ListAttr.end())) {
-#ifndef NDEBUG
- LLVM_DEBUG(dbgs() << "VFABI: adding mapping '" << S << "'\n");
- std::optional<VFInfo> Info =
- VFABI::tryDemangleForVFABI(S, *(CI.getModule()));
- assert(Info && "Invalid name for a VFABI variant.");
- assert(CI.getModule()->getFunction(Info->VectorName) &&
- "Vector function is missing.");
-#endif
- VariantMappings.push_back(std::string(S));
+ std::optional<VFInfo> Info = VFABI::tryDemangleForVFABI(S, CI);
+ if (Info && CI.getModule()->getFunction(Info->VectorName)) {
+ LLVM_DEBUG(dbgs() << "VFABI: Adding mapping '" << S << "'\n");
----------------
mgabka wrote:
since you are changing this dbg messages, I wonder if it would be worth to print also the original CI, what do you think?
https://github.com/llvm/llvm-project/pull/72260
More information about the llvm-commits
mailing list