[PATCH] D110799: [MemProf] Record accesses for all words touched in mem intrinsic

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 30 14:37:24 PDT 2021


snehasish accepted this revision.
snehasish added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: compiler-rt/test/memprof/TestCases/test_memintrin.cpp:8
 //   alloc_count 1, size (ave/min/max) 40.00 / 40 / 40
 //   access_count (ave/min/max): 3.00 / 3 / 3
 // but we need to look for them in the same CHECK to get the correct STACKIDP.
----------------
snehasish wrote:
> Update the count in the comments too?
> 
> I was trying to reason about the counts here: 
> For the first allocation for p = new int[10] - the allocation itself counts as 1 + memset counts for 5 (since kWordSize = 8). How do we account for the remaining 5 since the memcpy and memcmp have 2 full words and 1 half word access?
I guess since this is a primitive, the allocation and deallocation don't have accesses and thus the number of accesses is 5 + 3 + 3, rounding up for the half word accesses since the check is addr+size on L269.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110799



More information about the llvm-commits mailing list