[PATCH] D27188: Use trigrams to speed up SpecialCaseList.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 18:39:55 PST 2016
pcc added a comment.
Still LGTM
================
Comment at: include/llvm/Support/TrigramIndex.h:65-66
+ // decreases the costs in the regular case.
+ std::unordered_map<unsigned, SmallVector<size_t, 4>> Index =
+ std::unordered_map<unsigned, SmallVector<size_t, 4>>(256);
+};
----------------
Does `std::unordered_map<unsigned, SmallVector<size_t, 4>> Index{256};` work?
================
Comment at: lib/Support/SpecialCaseList.cpp:113
// See if we can store Regexp in Strings.
+ auto& Entry = Entries[Prefix][Category];
if (Regex::isLiteralERE(Regexp)) {
----------------
`auto &Entry`
https://reviews.llvm.org/D27188
More information about the llvm-commits
mailing list