[llvm-commits] Thread Sanitizer seems to have the dual issue

Kostya Serebryany kcc at google.com
Thu Nov 29 01:26:06 PST 2012


On Thu, Nov 29, 2012 at 1:23 PM, Chandler Carruth <chandlerc at google.com>wrote:

> On Thu, Nov 29, 2012 at 1:20 AM, Chandler Carruth <chandlerc at google.com>
> wrote:
> > You shouldn't see any performance degradation... Just create a null
> > pointer for the function in the pass. The first time you need it, if
> > null, getOrInsert. Afterwards, it isn't null. The null test shouldn't
> > matter at all.
>
> It occurs to me that of course, this pointer could only be used for
> the duration of a single runOnFunction invocation. That might make it
> less appealing as an optimization.
>

Yea, a bit scary. Again, what if runOnFunction runs in parallel. This will
become one more race to fix.
Let me simply call getOrInsertFunction in runOnFunction...
Ok?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121129/729c3e04/attachment.html>


More information about the llvm-commits mailing list