[llvm] [ctx_prof] Fix checks in `PGOCtxprofFlattening` (PR #108467)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 14:54:57 PDT 2024


================
@@ -178,7 +191,7 @@ class ProfileAnnotator final {
     bool KeepGoing = true;
     while (KeepGoing) {
       KeepGoing = false;
-      for (const auto &BB : reverse(F)) {
+      for (const auto &BB : F) {
----------------
mtrofin wrote:

We always have the entry BB's count, so it makes more sense to traverse top down.

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


More information about the llvm-commits mailing list