[PATCH] D44847: [profile] Fix value profile runtime merging issues
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 30 17:48:53 PDT 2018
davidxl 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 =
----------------
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.
https://reviews.llvm.org/D44847
More information about the llvm-commits
mailing list