[llvm] [llvm-profdata] Enabled functionality to write split-layout profile (PR #101795)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 21:22:30 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"))
----------------
wlei-llvm wrote:
I think we need to make sure that profiles in different formats, originating from the same source, to be equivalent. This means that if we do a round-trip conversion—from a "text" profile to an "extbinary" profile and back to a "text" profile—the two text profiles before and after the conversion should be identical. However, it seems that here the "!flat" metadata would be lost because we treat "!Flat" as a no-op, and the extended binary format won't be set to split-layout.
https://github.com/llvm/llvm-project/pull/101795
More information about the llvm-commits
mailing list