[PATCH] D31225: Use isFunctionHotInCallGraph to set the function section prefix.

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 16:09:04 PDT 2017


eraman added a comment.

The code looks fine to me, but the test needs to be updated.



================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:120
+
+/// Returns true if the function's entry or total call edge count is cold.
+/// If it returns false, it either means it is not hot or it is unknown
----------------
Nit: function's entry AND total call edge count is cold


================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:121
+/// Returns true if the function's entry or total call edge count is cold.
+/// If it returns false, it either means it is not hot or it is unknown
+/// whether it is hot or not (for example, no profile data is available).
----------------
Comment has been pasted from the previous function and hasn't been properly updated.


================
Comment at: test/Transforms/CodeGenPrepare/section.ll:1
 ; RUN: opt < %s -codegenprepare -S | FileCheck %s
 
----------------
The test needs to be updated. You've added one case - a function with cold entry with hot call edge - but the other scenarios (sum of outgoing edges is hot, cold function with non-cold outgoing edges etc) are not tested.


https://reviews.llvm.org/D31225





More information about the llvm-commits mailing list