[PATCH] D77417: [BFI][CGP] Add limited support for detecting missed BFI updates and fix one in CodeGenPrepare.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 14:48:09 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:1467
+    }
+    for (auto &Entry : OtherValidNodes) {
+      const BlockT* OtherBB = Entry.first;
----------------
davidxl wrote:
> yamauchi wrote:
> > davidxl wrote:
> > > If there is no mismatch detected at this point, the following check is redundant.
> > If there's a valid block in the Other BFI that's not in this BFI, this code is useful, as the comparison goes both ways?
> There are two cases:
> 1) when the NumberOfValidNodes is different 
> 2) when the NumberOfValidNodes is the same.
> 
> For the first case, the mismatch will be caught earlier. For the second case, in order to be 'mismatched',  there must be a validNode in *this not in Other. Otherwise, Other will be a superset of *this, and it will become case #1.   THis means the case 2 will also be caught in the previous loop.
Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77417





More information about the llvm-commits mailing list