================ @@ -265,7 +275,16 @@ Error llvm::createCtxProfFromYAML(StringRef Profile, raw_ostream &Out) { if (!TopList) return createStringError( "Unexpected error converting internal structure to ctx profile"); - Writer.writeContextual(*TopList, DC.TotalRootEntryCount); + + ctx_profile::ContextNode *FirstUnhandled = nullptr; + for (const auto &U : DC.Unhandled) { + SerializableCtxRepresentation Unhandled; + Unhandled.Guid = U.first; + Unhandled.Counters.insert(Unhandled.Counters.begin(), U.second.begin(), ---------------- mtrofin wrote:
wdym. this copies the counter values from `U.second` to `Unhandled`. `insert` with a first/last iterator pair will - afaik - allocate the diff (last - first) (caveats about difference being computable, but the source is also a vector). Also why would I reverse? There *is* a more efficient alternative - having a `createNode` that takes the guid and the counters separately - but not quite worth it for the yaml converter, it's a test utility. https://github.com/llvm/llvm-project/pull/131417 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits