This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1b8cde9b6338: [RISCV][NFC] Move static global variables into static variable in function. (authored by kito-cheng).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128726/new/ https://reviews.llvm.org/D128726 Files: clang/lib/Support/RISCVVIntrinsicUtils.cpp Index: clang/lib/Support/RISCVVIntrinsicUtils.cpp =================================================================== --- clang/lib/Support/RISCVVIntrinsicUtils.cpp +++ clang/lib/Support/RISCVVIntrinsicUtils.cpp @@ -31,10 +31,6 @@ const PrototypeDescriptor PrototypeDescriptor::Vector = PrototypeDescriptor(BaseTypeModifier::Vector); -// Concat BasicType, LMUL and Proto as key -static std::unordered_map<uint64_t, RVVType> LegalTypes; -static std::set<uint64_t> IllegalTypes; - //===----------------------------------------------------------------------===// // Type implementation //===----------------------------------------------------------------------===// @@ -822,6 +818,9 @@ Optional<RVVTypePtr> RVVType::computeType(BasicType BT, int Log2LMUL, PrototypeDescriptor Proto) { + // Concat BasicType, LMUL and Proto as key + static std::unordered_map<uint64_t, RVVType> LegalTypes; + static std::set<uint64_t> IllegalTypes; uint64_t Idx = computeRVVTypeHashValue(BT, Log2LMUL, Proto); // Search first auto It = LegalTypes.find(Idx);
Index: clang/lib/Support/RISCVVIntrinsicUtils.cpp =================================================================== --- clang/lib/Support/RISCVVIntrinsicUtils.cpp +++ clang/lib/Support/RISCVVIntrinsicUtils.cpp @@ -31,10 +31,6 @@ const PrototypeDescriptor PrototypeDescriptor::Vector = PrototypeDescriptor(BaseTypeModifier::Vector); -// Concat BasicType, LMUL and Proto as key -static std::unordered_map<uint64_t, RVVType> LegalTypes; -static std::set<uint64_t> IllegalTypes; - //===----------------------------------------------------------------------===// // Type implementation //===----------------------------------------------------------------------===// @@ -822,6 +818,9 @@ Optional<RVVTypePtr> RVVType::computeType(BasicType BT, int Log2LMUL, PrototypeDescriptor Proto) { + // Concat BasicType, LMUL and Proto as key + static std::unordered_map<uint64_t, RVVType> LegalTypes; + static std::set<uint64_t> IllegalTypes; uint64_t Idx = computeRVVTypeHashValue(BT, Log2LMUL, Proto); // Search first auto It = LegalTypes.find(Idx);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits