[PATCH] D10674: Value profiling - patchset 3

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 09:27:31 PDT 2015


davidxl added inline comments.

================
Comment at: lib/ProfileData/InstrProfReader.cpp:326
@@ +325,3 @@
+      for (uint64_t VCount = 0; VCount < ValueDataCount; ++VCount) {
+        if (D + 2 * sizeof(uint64_t) > End)
+          return false;
----------------
This check can be moved outside of the loop.

================
Comment at: lib/ProfileData/InstrProfReader.cpp:332
@@ +331,3 @@
+          auto Result = HashKeyMap.find(Value);
+          if (Result == HashKeyMap.end())
+            continue;
----------------
If there is no better way to do error handling here, set the value to Null before continue.


http://reviews.llvm.org/D10674





More information about the llvm-commits mailing list