[cfe-dev] AST matchers and thread safety

Gabor Kozar kozargabor at gmail.com
Tue Sep 24 01:41:58 PDT 2013


Hi,



Since the AST should be immutable once created, and AST matchers are
only a high-level wrapper for RecursiveASTVisitor, so I'd expect no
problems with multithreading. This definitely needs to be confirmed
though by someone who actually knows what they are talking about. :)



Just out of curiosity, what is your use case? Navigating the AST is
fast, especially compared to the cost of building the AST. Are you
running a huge number of matchers?



--
Gábor Kozár -- ShdNx
kozargabor at gmail.com





On Tue, Sep 24, 2013, at 10:15, Jesper Eskilson wrote:



Hi,



Are the AST matchers thread safe? I have a bunch of matchers which I

would like to run in separate threads for performance reasons. Is that

expected to work, or am I overly optimistic?



/Jesper



--

*Jesper Eskilson* /Development Engineer/

IAR Systems AB

Box 23051, Strandbodgatan 1

SE-750 23 Uppsala, SWEDEN

E-mail: [1]jesper.eskilson at iar.com <[2]mailto:jesper.eskilson at iar.com>

Website: www.iar.com

<[3]http://www.iar.com> Twitter: www.twitter.com/iarsystems

<[4]http://www.twitter.com/iarsystems>

_______________________________________________

cfe-dev mailing list

[5]cfe-dev at cs.uiuc.edu

[6]http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

References

1. mailto:jesper.eskilson at iar.com
2. mailto:jesper.eskilson at iar.com
3. http://www.iar.com/
4. http://www.twitter.com/iarsystems
5. mailto:cfe-dev at cs.uiuc.edu
6. http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130924/f4555303/attachment.html>


More information about the cfe-dev mailing list