[PATCH] D22118: Implement callsite-hotness based inline cost for Sample-based PGO

Diego Novillo via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 07:48:32 PDT 2016


dnovillo accepted this revision.
dnovillo added a comment.
This revision is now accepted and ready to land.

LGTM with a couple of small changes.


================
Comment at: lib/IR/Metadata.cpp:1323
@@ +1322,3 @@
+  if (!ProfileData)
+    return false;
+
----------------
This will leave TotalVal in an undefined state.  Perhaps initialize it to 0 at the start?

================
Comment at: lib/IR/Metadata.cpp:1327
@@ +1326,3 @@
+  if (!ProfDataName || !ProfDataName->getString().equals("branch_weights"))
+    return false;
+
----------------
Likewise.


http://reviews.llvm.org/D22118





More information about the llvm-commits mailing list