[PATCH] D20483: [esan] EfficiencySanitizer working set tool fastpath
Mike Aizatsky via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 13:53:25 PDT 2016
aizatsky added inline comments.
================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:71
@@ +70,3 @@
+static const uint64_t ShadowOffs[4] = { // Indexed by scale
+ 0x0000130000000000ull,
+ 0x0000220000000000ull,
----------------
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?
================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:400
@@ +399,3 @@
+
+bool EfficiencySanitizer::instrumentFastpathWorkingSet(
+ Instruction *I, const DataLayout &DL, Value *Addr, unsigned Alignment) {
----------------
Document what code are you generating - it is hard to read IR building.
http://reviews.llvm.org/D20483
More information about the llvm-commits
mailing list