[PATCH] D126826: [BOLT][NFC] Replace stdio with raw_ostream in CallGraph

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 00:06:27 PDT 2022


Amir added inline comments.


================
Comment at: bolt/include/bolt/Passes/CallGraph.h:182
       ArcConstIterator Arc = findArc(F, Dst);
-      fprintf(
-          File,
-          "f%lu -> f%u [label=\"normWgt=%.3lf,weight=%.0lf,callOffset=%.1lf\"];"
-          "\n",
-          F, Dst, Arc->normalizedWeight(), Arc->weight(), Arc->avgCallOffset());
+      OS << "f" << (unsigned long)F << " -> f" << (unsigned)Dst
+         << " [label=\"normWgt=" << format("%.3lf", Arc->normalizedWeight())
----------------
There are still some type casts left on this line


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126826



More information about the llvm-commits mailing list