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

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 20:50:17 PDT 2020


vitalybuka 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;
----------------
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


================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:810
+
+  DFSanUseFast16LabelsFn = Mod->getOrInsertFunction("dfsan_use_fast16labels",
+                                                    DFSanUseFast16LabelsFnTy);
----------------
DFSanUseFast16LabelsFnTy and DFSanUseFast16LabelsFn is used one in one place
I'd make them local variables.  in if (ClFast16Labels) of runOnModule


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84371/new/

https://reviews.llvm.org/D84371





More information about the llvm-commits mailing list