[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

Matt Morehouse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 11:33:38 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;
----------------
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.


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