[PATCH] D20483: [esan] EfficiencySanitizer working set tool fastpath
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 14:58:27 PDT 2016
bruening added inline comments.
================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:71
@@ +70,3 @@
+static const uint64_t ShadowOffs[4] = { // Indexed by scale
+ 0x0000130000000000ull,
+ 0x0000220000000000ull,
----------------
aizatsky wrote:
> uh-oh. These are really magical constants copied.
> Unfortunately there's no proper way to share code between runtime / llvm. I talked with our cube and the idea is to introduce a separate header (e.g. esan_compile_interface.h) and put all shareable constants there. At least that would make it clear what you are sharing. At best - you can manually synchronize the file by copying. WDYT?
Yes, this lack of ability to share is something I was surprised at in the other sanitizers. I talked to kcc about it early on when starting this project and it sounded like copying a handful of constants was something everyone was willing to live with and that they did not plan to push for any better approach, so I followed suit here.
Sure, a separate header sounds good. Is there a plan to do this for the other sanitizers?
I assume the header would go into include/llvm/Transforms/ and should probably follow the CamelCase naming.
http://reviews.llvm.org/D20483
More information about the llvm-commits
mailing list