[PATCH] D24638: [thinlto] Basic thinlto fdo heuristic

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 10:35:19 PDT 2016


Prazek added inline comments.

================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:6303
@@ +6302,3 @@
+        if (OldVersion)
+          I += 2; // Skip 2 old fields (callsite_count, profile_count).
+        else if (HasProfile) // can interpret hotness with new version.
----------------
tejohnson wrote:
> Only skipping 2 fields if HasProfile, otherwise just skip 1 (callsite_count). Can you make sure there is a test that has the old format bitcode (both with and without old profile)? I.e. you would commit old bitcode - there are some existing tests that do this (look at the .bc files committed in test/Bitcode for examples).
good catch. I didn't know how to properly test it :(


https://reviews.llvm.org/D24638





More information about the llvm-commits mailing list