[PATCH] D159460: [BOLT][NFC] Speedup YAML profile processing

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 13:41:43 PDT 2023


maksfb added a comment.

Nice - good improvement. Do you know where the majority of the profile-processing time is spent with this change?



================
Comment at: bolt/include/bolt/Profile/YAMLProfileReader.h:84
   /// Update matched YAML -> BinaryFunction pair.
-  void matchProfileToFunction(yaml::bolt::BinaryFunctionProfile &YamlBF,
+  bool matchProfileToFunction(yaml::bolt::BinaryFunctionProfile &YamlBF,
                               BinaryFunction &BF) {
----------------
Is the change to always return `true` necessary?


================
Comment at: bolt/lib/Profile/YAMLProfileReader.cpp:52
+    if (BinaryData *BD = BC.getBinaryDataByName(Name))
+      if (MCSymbol *Symbol = BD->getSymbol())
+        return BC.getFunctionForSymbol(Symbol);
----------------
This should always return non-null value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159460



More information about the llvm-commits mailing list