<div dir="ltr">Rui also mentioned in r260745 that a similar thing would be necessary for efficient handling of SECTIONS too.<div><br>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.</div><div><br></div><div>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.</div><div><br></div><div><div><div><div>-- Sean Silva</div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 30, 2016 at 7:46 PM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No idea why this just came to mind, but anyway:<br>
<br>
I remember you mentioning that one annoying thing about version<br>
scripts is the need to match each symbol against multiple possible<br>
regular expressions (globs?).<br>
<br>
But I just remembered that that can be done efficiently. Multiple<br>
regular expressions can be tested at once. They are all just NFAs :-)<br>
<br>
Cheers,<br>
Rafael<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>