[PATCH] D9009: Value profiling compiler-rt changes

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 11:17:23 PDT 2015


davidxl added inline comments.

================
Comment at: lib/profile/InstrProfiling.c:133
@@ +132,3 @@
+__attribute__((visibility("hidden")))
+uint64_t __llvm_profile_gather_value_data(uint32_t **DataCountsArray,
+  uint64_t *NumDataCounts, __llvm_profile_value_data **DataArray) {
----------------
Add documentation comments including parameter description.

================
Comment at: lib/profile/InstrProfiling.c:175
@@ +174,3 @@
+    }
+
+    for (uint32_t i = 0; i < CurrentSiteCount; ++i) {
----------------
you can store DataCountsArray+CurrentSiteIndex to the __llvm_profile_data instance here (function pointer field)

================
Comment at: lib/profile/InstrProfilingFile.c:55
@@ -45,1 +54,3 @@
   Header[6] = (uintptr_t)NamesBegin;
+  Header[7] = ValueDataCountsSize;
+  Header[8] = ValueDataSize;
----------------
Record ValueDataCountsBegin and ValueDataBegin in the header.


http://reviews.llvm.org/D9009





More information about the llvm-commits mailing list