[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.
Matt Morehouse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 14 13:35:30 PDT 2020
morehouse added inline comments.
================
Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180
dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) {
- if (flags().fast16labels)
+ if (fast16labels)
return l1 | l2;
----------------
morehouse wrote:
> vitalybuka wrote:
> > morehouse wrote:
> > > vitalybuka wrote:
> > > > isn't better just create new set of callbacks?
> > > > e.g __dfsan_fast16_union
> > > > and then we don't need any flags or preinit array initialization
> > > Should work for `__dfsan_union` and `__dfsan_union_load`, but what about all the other API functions the user can call directly? We wouldn't be able to warn in those cases.
> > > Should work for `__dfsan_union` and `__dfsan_union_load`, but what about all the other API functions the user can call directly? We wouldn't be able to warn in those cases.
> >
> > Those calls are no-op, it would be nice, but it's not worth it.
> > You can avoid state variable fast16labels, and avoid preinit_array which time to time conflicts with other libs. Which looks more useful then warning.
> >
> >
> >
> Thanks. Turns out we only need `__dfsan_union_load_fast16labels`, which makes things simpler.
Turns out we might need a fast16 flag and preinit_array after all, since many of the custom wrappers call `dfsan_union`...
@vitalybuka Any ideas to avoid this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84371/new/
https://reviews.llvm.org/D84371
More information about the cfe-commits
mailing list