[PATCH] D52845: Update entry count for cold calls

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 10:28:22 PST 2019


wmi added inline comments.


================
Comment at: include/llvm/DebugInfo/DIContext.h:101-105
+  
+  void resize(unsigned i) {
+    Frames.resize(i);
+  }
+  
----------------
Are the changes in this file belonging to some other patch?


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:322-323
+
+  // Information recorded when we declined to inline a call site
+  // because we have determined it is too cold.
+  struct NotInlinedProfileInfo {
----------------
Can we make the comment more precise? I think NotInlinedProfileInfo is an accumulated information from all the callsites to the same function not being inlined but with inline instance in the profile. It is not a local information for each callsite. 


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:787
+
+  DenseMap<Instruction *, const FunctionSamples *> localNotInlinedCalls;
   bool Changed = false;
----------------
Can we change the name to be more self-explain or give it a comment? These are not just calls not being inlined, but also with inline instance in the profile. 


================
Comment at: test/Transforms/SampleProfile/entry_counts_cold.ll:2
+; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/entry_counts_cold.prof -S | FileCheck %s
+; ModuleID = 'temp.bc'
+source_filename = "temp.c"
----------------
Please briefly describe what the test is up for so people don't have to search the commit history to find out.


================
Comment at: test/Transforms/SampleProfile/entry_counts_cold.ll:26
+  %3 = load i32*, i32** %p.addr, align 8, !dbg !28, !tbaa !15
+; bar is not 
+; CHECK: call i32 @bar
----------------
bar is not inlined.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52845/new/

https://reviews.llvm.org/D52845





More information about the llvm-commits mailing list