[PATCH] D159529: [BOLT][YAML] Only read first profile per function

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 20:07:32 PDT 2023


Amir added inline comments.


================
Comment at: bolt/lib/Profile/YAMLProfileReader.cpp:307
+      }
+      BF = nullptr;
+    }
----------------
maksfb wrote:
> Amir wrote:
> > maksfb wrote:
> > > Unneeded.
> > It is needed because the attaching happens in lines 341-354. Preliminary exec count assignment is a suitable place where it's easy/cheap to check if the profile was attached already.
> Then you need `auto &BF`.
As discussed offline, this structured binding expands into reference types so modifying `BF` here has an effect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159529



More information about the llvm-commits mailing list