[cfe-commits] Please review: enable TBAA at "-O0 -fthread-sanitizer"

Kostya Serebryany kcc at google.com
Thu Apr 5 10:50:25 PDT 2012


On Thu, Apr 5, 2012 at 10:37 AM, Chris Lattner <clattner at apple.com> wrote:

>
> On Apr 5, 2012, at 9:43 AM, Kostya Serebryany wrote:
>
> > Hello,
> >
> > Please review the following patch:
> > ThreadSanitizer instrumentation relies on TBAA for correctness, so we
> need to generate TBAA at "-O0 -fthread-sanitizer".
>
> This is close, but not the right solution.  TBAA can cause a semantic
> change when enabled (though I admit it is unlikely given that nearly all of
> the optimizers are disabled at -O0).
>
> The right fix is for TSAN to generate *vtable* TBAA info, but not other
> TBAA info.
>

Ok...
Do you mean that we need to check "CodeGenOpts.OptimizationLevel > 0"
inside CodeGenTBAA methods?
Or pass a flag to CodeGenTBAA::CodeGenTBAA saying that we need only vtable
TBAA?

--kcc



>
> -Chris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120405/af9073f0/attachment.html>


More information about the cfe-commits mailing list