[PATCH] D15258: [PGO] Remove data races on Data->Values field

Betul Buyukkurt via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 14:25:56 PST 2015


betulb added inline comments.

================
Comment at: lib/profile/InstrProfilingFile.c:23
@@ +22,3 @@
+
+/* The Values field of __llvm_profile_data structure is used to storek runtime
+ * ValueProfNode data pointers which is not what needs to be written out
----------------
storek -> store ?

================
Comment at: lib/profile/InstrProfilingValue.c:152
@@ -169,1 +151,3 @@
 
+void **DataValuePtrs LLVM_LIBRARY_VISIBILITY;
+
----------------
I do not think we really do need a DataValuePtrs array. I like the direction taken by the removal of the update of the Values field of the ProfileData struct, but I do not think this implementation makes the overall need for synchronization any less due to the global declaration of the DataValuePtr's array. This also resurfaces the comments made for a previous implementation i.e. "depending on the implicit ordering of the ProfileData nodes in memory for reading of ValueData nodes".  Value profiling data is readable w/o this indirection. I do not think there is any need for this array. 




http://reviews.llvm.org/D15258





More information about the llvm-commits mailing list