[PATCH] D15258: [PGO] Remove data races on Data->Values field
Betul Buyukkurt via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 23 17:28:02 PST 2015
betulb added a comment.
LGTM overall.
================
Comment at: lib/profile/InstrProfilingValue.c:135
@@ -174,1 +134,3 @@
+__llvm_profile_gather_value_data(uint64_t *ValueDataSize) {
+ size_t S = 0;
__llvm_profile_data *I;
----------------
nullptr check for ValueDataSize.
================
Comment at: lib/profile/InstrProfilingWriter.c:65
@@ +64,3 @@
+ BufferSz = VPBufferSize ? VPBufferSize : VP_BUFFER_SIZE;
+ BufferStart = (char *)CallocHook(BufferSz, 1);
+ if (!BufferStart)
----------------
1 -> sizeof(uint8_t) .
sizeof(char), sizeof(uint8_t) and imm constant value 1 are all interspersed throughout the code. sizeof(uint8_t) should replace all necessary locations to be consistent throughout the code. Similarly both char and uint8_t as types are used interchangeably throughout the code. Using one of the two consistently is preferable.
http://reviews.llvm.org/D15258
More information about the llvm-commits
mailing list