<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 5:26 PM, Rui Ueyama via llvm-commits <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"><div dir="ltr">What I'm worrying is this. Let N be the number of symbols in all input files and M be the number of symbols that appear in version scripts.<div><br></div><div>If there's no pattern matching in version symbol script, then the cost of setting versions is O(M). We call SymbolTable::find(StringRef) for each symbol from version scripts and set a version to the return value.</div><div><br></div><div>But if we allow patterns, the cost becomes O(N). Even though is better than O(N*M), it is a large number. M is order of hundreds or thousands, but N can be as large as order of millions.</div><div><br></div><div>So I think we should avoid pattern matching to symbols.</div></div></blockquote><div><br></div><div>What do we do if the user passes a version script that has a pattern match? Emit an error?</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span class=""><br><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:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</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>
</blockquote></div><br></div></span></div></div>
<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>
<br></blockquote></div><br></div></div>