llvm/unittests
Ivan Krasin c22ac1df07 Use trigrams to speed up SpecialCaseList.
Summary:
it's often the case when the rules in the SpecialCaseList
are of the form hel.o*bar. That gives us a chance to build
trigram index to quickly discard 99% of inputs without
running a full regex. A similar idea was used in Google Code Search
as described in the blog post:
https://swtch.com/~rsc/regexp/regexp4.html

The check is defeated, if there's at least one regex
more complicated than that. In this case, all inputs
will go through the regex. That said, the real-world
rules are often simple or can be simplied. That considerably
speeds up compiling Chromium with CFI and UBSan.

As measured on Chromium's content_message_generator.cc:

before, CFI: 44 s
after, CFI: 23 s
after, CFI, no blacklist: 23 s (~1% slower, but 3 runs were unable to show the difference)
after, regular compilation to bitcode: 23 s

Reviewers: pcc

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D27188

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 02:54:54 +00:00
..
ADT Add some searching functions for ArrayRef<T>. 2016-11-22 23:22:19 +00:00
Analysis [PM] Extend the explicit 'invalidate' method API on analysis results to 2016-11-28 22:04:31 +00:00
AsmParser Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
Bitcode Bitcode: Change module reader functions to return an llvm::Expected. 2016-11-13 07:00:17 +00:00
CodeGen GlobalISel: rename legalizer components to match others. 2016-10-14 22:18:18 +00:00
DebugInfo Clean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue::getFixedFormSizes() 2016-11-11 16:21:37 +00:00
ExecutionEngine Remove a stale test case. 2016-11-17 01:02:52 +00:00
IR [PM] Extend the explicit 'invalidate' method API on analysis results to 2016-11-28 22:04:31 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
MC Fix static initialization order fiasco in MCTests 2016-11-11 22:18:42 +00:00
MI CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses 2016-08-24 01:52:46 +00:00
Object Fix llvm-symbolizer to correctly sort a symbol array and calculate symbol sizes 2016-11-15 21:07:03 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
ProfileData Fix spelling mistakes in Tools/Tests comments. NFC. 2016-11-20 13:31:13 +00:00
Support Use trigrams to speed up SpecialCaseList. 2016-12-01 02:54:54 +00:00
Target Remove a FIXME that I forgot about. NFC. 2016-10-13 05:28:55 +00:00
Transforms Make the FunctionComparator of the MergeFunctions pass a stand-alone utility. 2016-11-11 21:15:13 +00:00
CMakeLists.txt Fix llvm-symbolizer to correctly sort a symbol array and calculate symbol sizes 2016-11-15 21:07:03 +00:00