[PATCH] D21594: [esan|cfrag] Add counters for struct array accesses
Qin Zhao via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 18:42:52 PDT 2016
zhaoqin added inline comments.
================
Comment at: lib/Transforms/Instrumentation/EfficiencySanitizer.cpp:174
@@ +173,3 @@
+ unsigned CounterIdx);
+ unsigned getStructCounterSize(StructType *StructTy) {
+ // We use one counter for each struct field and one additional
----------------
aizatsky wrote:
> It is not clear to me what you are getting by appending counter to the end rather than adding a fixed field to the struct. Wouldn't the code become simpler?
As I explained in the comment below, I was trying to avoid creating additional variable name for the new counter, so reduce link time, which deduplicates/merges counters based on their names.
http://reviews.llvm.org/D21594
More information about the llvm-commits
mailing list