[PATCH] D44847: [profile] Fix value profile runtime merging issues

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 30 21:46:17 PDT 2018


xur marked an inline comment as done.
xur added inline comments.


================
Comment at: lib/profile/InstrProfilingFile.c:189
+  // prevent from leaving garbage data at the end of the profile file.
+  __llvm_profile_header *Header = (__llvm_profile_header *)ProfileBuffer;
+  const __llvm_profile_data *DataStart =
----------------
davidxl wrote:
> What I suggested is to use public APIs:
> 
> __llvm_profile_begin_data(), __llvm_profile_end_data(), __llvm_profile_begin_counters(), __llvm_profile_end_counters(), so that you don't even need to to assume the raw profile layout here.
you are right! as we have checked the compatibility, both versions should have the same format.


https://reviews.llvm.org/D44847





More information about the llvm-commits mailing list