[PATCH] D83013: [LPM] Port CGProfilePass from NPM to LPM

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 14:01:27 PDT 2020


MaskRay added a comment.

In D83013#2139882 <https://reviews.llvm.org/D83013#2139882>, @zequanwu wrote:

> > The alternative of using LazyBlockFrequencyInfoPass and checking PSI->hasProfileSummary() first would also work I guess. If you think that's cleaner, maybe that's the better way to go.
>
> Since `PSI->hasProfileSummary()` is not necessary for this pass, it relies on function entry count. So, I check for `F.getEntryCount()` before getting BFI.


Thanks. The last update looks good to me. I'll defer the approval to @nikic and folks who have expressed concerns about deleting legacy PM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83013





More information about the cfe-commits mailing list