[PATCH] D17827: Use LineLocation instead of CallsiteLocation to index callsite profile.

Diego Novillo via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 14:36:42 PST 2016


dnovillo added a comment.

Nice cleanup!  I think we can prevent breaking the AutoFDO tool by adding an overload.


================
Comment at: include/llvm/ProfileData/SampleProf.h:284
@@ -294,1 +283,3 @@
 private:
+  StringRef Name;
+
----------------
Add documentation for this field.  Indicate that this is the mangled name of the function.

================
Comment at: include/llvm/ProfileData/SampleProfWriter.h:38
@@ -37,3 +37,3 @@
   /// \returns status code of the file update operation.
-  virtual std::error_code write(StringRef FName, const FunctionSamples &S) = 0;
+  virtual std::error_code write(const FunctionSamples &S) = 0;
 
----------------
This will break the AutoFDO tool.

Idea: keep the old call as a temporary overload.  This gives you time to fix AutoFDO without it breaking on you in the interim.  The version of SampleProfileWriter::write() that takes FName as an argument simply does nothing with it.


http://reviews.llvm.org/D17827





More information about the llvm-commits mailing list