[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 13:29:49 PDT 2022


rnk added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmt.cpp:815
   // Prefer the PGO based weights over the likelihood attribute.
   // When the build isn't optimized the metadata isn't used, so don't generate
----------------
I lean towards implementing the intended behavior reflected in this comment here, which is that PGO data overrides programmer annotations in case of conflict. We should also check the PGO docs to see if this is documented. If we've already made promises about how this is supposed to work, I'd prefer to trust our past decisions rather than revisiting them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134456



More information about the cfe-commits mailing list