[PATCH] asan: optimization experiments

Dmitry Vyukov dvyukov at google.com
Thu Mar 12 01:44:54 PDT 2015


PTAL


================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:926
@@ +925,3 @@
+  // negatives) and make the decision on the optimization.
+  uint32_t Exp = ClForceExperiment;
+
----------------
kcc wrote:
> Do I understand correctly that this patch does not set Exp to anything interesting by default,
> and that will be added in the following patches? 
Yes, this patch does not add any active experiments.
No, there won't be following patches with experiments. There is no reason to commit any experiments. You implement an experiment locally, evaluate it and then either commit the optimization or commit nothing.

================
Comment at: lib/asan/asan_thread.h:121
@@ +120,3 @@
+  // Rathole to pass experiments mask from __asan_exp_loadN to __asan_loadN.
+  u32 report_experiment_;
+
----------------
kcc wrote:
> That's gross. Why not just pass an extra parameter?? 
Why is __asan_load/store such a huge macro today and not a normal function?
The only reason I see is that the function is performance critical and we don't want to obtain pc/bp/sp and call another function (__asan_exp_load/store). I've made the current implementation based on this.
If the function is not performance critical, then we need wipe the entire macro and replace it with a function.

http://reviews.llvm.org/D8198

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list