[LLVMdev] Special case list files; a bug and a slowness issue
peter at pcc.me.uk
Fri Jul 12 17:38:36 PDT 2013
I need to be able to use a special case list file containing thousands
of entries (namely, a list of libc symbols, to be used when using
DFSan with an uninstrumented libc). Initially I built the symbol
list like this:
What I found was that, despite various bits of documentation [1,2],
the symbol names are matched as substrings, the root cause being that
the regular expressions built by the SpecialCaseList class do not
contain anchors. The attached unit test demonstrates the problem.
If I modify my symbol list to contain anchors:
the behaviour is as expected, but compiler run time is slow (on the
order of seconds), presumably because our regex library doesn't cope
with anchors very efficiently.
I intend to resolve the substring bug and the slow run time issue
by using a StringSet for symbol patterns which do not contain regex
metacharacters. There would still be a regex for any other patterns,
which would have anchors added automatically.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 842 bytes
Desc: not available
More information about the llvm-dev