complexity of matching symbol names to version scripts

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 17:12:44 PDT 2016


Rui also mentioned in r260745 that a similar thing would be necessary for
efficient handling of SECTIONS too.

I think we may even have it easier because I don't think any of the
matching operations we have to do involve closure over arbitrary regexes.
I.e. all closure operations are of the form `.*` and not something like
`[a-z]*` or `(a?[a-z]*)*`. Also, I think that closure is the only operation
that can match zero characters.

Also, naively using an NFA matcher (e.g. Ken Thompson's) on the merged NFA
does not change the complexity compared to individually matching multiple
NFA's.

-- Sean Silva

On Sat, Apr 30, 2016 at 7:46 PM, Rafael EspĂ­ndola <
llvm-commits at lists.llvm.org> wrote:

> No idea why this just came to mind, but anyway:
>
> I remember you mentioning that one annoying thing about version
> scripts is the need to match each symbol against multiple possible
> regular expressions (globs?).
>
> But I just remembered that that can be done efficiently. Multiple
> regular expressions can be tested at once. They are all just NFAs :-)
>
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/536deeaf/attachment.html>


More information about the llvm-commits mailing list