[PATCH] D74809: [MBP][X86] Include static prof data when collecting loop BBs

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 15:45:19 PDT 2020


void marked an inline comment as done.
void added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2516
+  if (F->getFunction().hasProfileData() || ForceLoopColdBlock ||
+      L.hasStaticProfInfo()) {
     BlockFrequency LoopFreq(0);
----------------
davidxl wrote:
> The check here seems too weak.  One branch in the loop has user annotation does not mean other branch probablity data can be trusted.  More sophisticated analysis is needed.
Do you mean that a builtin_expect shouldn't be considered when using profile data?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74809





More information about the llvm-commits mailing list