[llvm] [llvm-profdata] Enabled functionality to write split-layout profile (PR #101795)

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 10:33:58 PDT 2024


================
@@ -223,6 +223,11 @@ static bool ParseLine(const StringRef &Input, LineType &LineTy, uint32_t &Depth,
 
   if (Input[Depth] == '!') {
     LineTy = LineType::Metadata;
+    // This metadata is only for manual inspection only. We already created a
+    // FunctionSamples and put it in the profile map, so there is no point
+    // to skip profiles even they have no use for ThinLTO.
+    if (Input == StringRef(" !Flat"))
----------------
david-xl wrote:

Does losing !flat change the semantics of the profile? If not, they are still equivalent?  On other hand, instead of using meta data, would a comment line be sufficient?

https://github.com/llvm/llvm-project/pull/101795


More information about the llvm-commits mailing list