[PATCH] D62700: [PGO] Handle cases of non-instrument BBs

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 14:05:31 PDT 2019


davidxl added a comment.

This can be handled this way:

  BBInfo &SrcInfo = getBBInfo(SrcBB);    // BBInfo is the template type
  BBInfo &DestInfo = getBBInfo(DestBB);
  SrcInfo.addOutEdge(E.get());
  DestInfo.addInEdge(E.get());

For base class BBInfo, addOutEdge, addInEdge will be empty, while it is defined for UseBBInfo class.

By so doing, the code is more readable.


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

https://reviews.llvm.org/D62700





More information about the llvm-commits mailing list