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

Kostya Serebryany kcc at google.com
Thu Nov 29 01:55:20 PST 2012


r168864.

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

> On Thu, Nov 29, 2012 at 1:26 AM, Kostya Serebryany <kcc at google.com> wrote:
> >
> >
> > 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?
>
> Yea, either that or the compiler.used variable seems cleanest.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121129/a22850c0/attachment.html>


More information about the llvm-commits mailing list