[MemProf] Record accesses for all words touched in mem intrinsic
authorTeresa Johnson <tejohnson@google.com>
Thu, 30 Sep 2021 02:14:09 +0000 (19:14 -0700)
committerTeresa Johnson <tejohnson@google.com>
Thu, 30 Sep 2021 22:07:55 +0000 (15:07 -0700)
commit0d8bdc17862e1c80edf1223282af3be786da4882
tree05bbde7591ba5d65c57be252a41ad8e4dd045895
parentc82f98ba4c7038dfd7bc912c1fed891e4ff34818
[MemProf] Record accesses for all words touched in mem intrinsic

Previously for mem* intrinsics we only incremented the access count for
the first word in the range. However, after thinking it through I think
it makes more sense to record an access for every word in the range.
This better matches the behavior of inlined memory intrinsics, and also
allows better analysis of utilization at a future date.

Differential Revision: https://reviews.llvm.org/D110799
compiler-rt/lib/memprof/memprof_rtl.cpp
compiler-rt/test/memprof/TestCases/test_memintrin.cpp
compiler-rt/test/memprof/TestCases/unaligned_loads_and_stores.cpp