llvm-6502/lib
Peter Collingbourne acf4cf7757 Introduce an optimisation for special case lists with large numbers of literal entries.
Our internal regex implementation does not cope with large numbers
of anchors very efficiently.  Given a ~3600-entry special case list,
regex compilation can take on the order of seconds.  This patch solves
the problem for the special case of patterns matching literal global
names (i.e. patterns with no regex metacharacters).  Rather than
forming regexes from literal global name patterns, add them to
a StringSet which is checked before matching against the regex.
This reduces regex compilation time by an order of roughly thousands
when reading the aforementioned special case list, according to a
completely unscientific study.

No test cases.  I figure that any new tests for this code should
check that regex metacharacters are properly recognised.  However,
I could not find any documentation which documents the fact that the
syntax of global names in special case lists is based on regexes.
The extent to which regex syntax is supported in special case lists
should probably be decided on/documented before writing tests.

Differential Revision: http://llvm-reviews.chandlerc.com/D1150

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187732 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 17:48:04 +00:00
..
Analysis Minor address space code simplification. 2013-08-03 01:03:12 +00:00
AsmParser Target/X86: Add explicit Win64 and System V/x86-64 calling conventions. 2013-07-12 06:02:35 +00:00
Bitcode Make .bc en/decoding of AttrKind stable 2013-07-26 04:16:55 +00:00
CodeGen Don't leak passes if added outside of the area determined by Started/Stopped flags. 2013-08-05 11:11:11 +00:00
DebugInfo DebugInfo: Factor out parsing compile unit DIEs to a separate function. Improve code style and comments. 2013-07-15 08:43:35 +00:00
ExecutionEngine LLVM Interpreter: This patch implements vector support for cast operations (zext, sext, uitofp, sitofp, trunc, fpext, fptosi, fptrunc, bitcast) and shift operations (shl, ashr, lshr) for integer and floating point data types. 2013-08-05 12:17:06 +00:00
IR Add a AttributeSetImpl::dump function. 2013-08-02 22:34:30 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
Linker
MC AsmParser: Store MacroLikeBodies on the side so they don't get leaked. 2013-08-04 09:06:29 +00:00
Object MachObjectFile: Don't leak on error. 2013-08-03 22:16:37 +00:00
Option Option parsing: recognize the special -- token 2013-08-02 21:20:27 +00:00
Support Introduce Regex::isLiteralERE function. 2013-08-05 17:47:59 +00:00
TableGen
Target Silencing an MSVC11 type conversion warning. 2013-08-05 13:47:03 +00:00
Transforms Introduce an optimisation for special case lists with large numbers of literal entries. 2013-08-05 17:48:04 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile