History log of /external/llvm/lib/Transforms/Utils/SpecialCaseList.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
acf4cf775763c6896f14f1d3a988058de05ca704 05-Aug-2013 Peter Collingbourne <peter@pcc.me.uk> 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
/external/llvm/lib/Transforms/Utils/SpecialCaseList.cpp
71981ef040dd94438449aeca726cab5839d8ec3c 16-Jul-2013 Peter Collingbourne <peter@pcc.me.uk> Make SpecialCaseList match full strings, as documented, using anchors.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Utils/SpecialCaseList.cpp
46e11c4c97fe1c424241e4098801456303a5c86e 10-Jul-2013 Peter Collingbourne <peter@pcc.me.uk> Implement categories for special case lists.

A special case list can now specify categories for specific globals,
which can be used to instruct an instrumentation pass to treat certain
functions or global variables in a specific way, such as by omitting
certain aspects of instrumentation while keeping others, or informing
the instrumentation pass that a specific uninstrumentable function
has certain semantics, thus allowing the pass to instrument callers
according to those semantics.

For example, AddressSanitizer now uses the "init" category instead of
global-init prefixes for globals whose initializers should not be
instrumented, but which in all other respects should be instrumented.

The motivating use case is DataFlowSanitizer, which will have a
number of different categories for uninstrumentable functions, such
as "functional" which specifies that a function has pure functional
semantics, or "discard" which indicates that a function's return
value should not be labelled.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Utils/SpecialCaseList.cpp
c5afb9ed5eb9aeb3eff5158e15844705e8a9ee2d 10-Jul-2013 Peter Collingbourne <peter@pcc.me.uk> Introduce a SpecialCaseList ctor which takes a MemoryBuffer to make
it more unit testable, and fix memory leak in the other ctor.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Utils/SpecialCaseList.cpp
405515d55f470d04ef75f653b7f1994329c9066b 10-Jul-2013 Peter Collingbourne <peter@pcc.me.uk> Rename BlackList class to SpecialCaseList and move it to Transforms/Utils.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Utils/SpecialCaseList.cpp