[PATCH] D148903: [PGO] Avoid potential const_cast UB (NFC)

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 09:30:47 PDT 2023


xur added a comment.

Thanks for working on this.
PGOEdge is shared by PGO instrumentation pass and PGO profile-use pass. We cast away const for PGO instrumentation. But for PGO profile-use, we don't change the BB. I would prefer to keep the const for profile-use passes. So I think a better fix is to make PGOEdge a template class, one with const and one without.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148903



More information about the llvm-commits mailing list