[PATCH] D103289: A post-processing for BFI inference
    David Li via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jun  4 13:24:29 PDT 2021
    
    
  
davidxl added inline comments.
================
Comment at: llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h:1489
+    }
+    if (OneMinusSelfProb != Scaled64::getOne())
+      NewFreq /= OneMinusSelfProb;
----------------
spupyrev wrote:
> davidxl wrote:
> > Does it apply to other backedges too?
> not sure I fully understand the question, but we need an adjustment only for self-edges; blocks without self-edges don't need any post-processing
> 
> I added a short comment before the loop
NewFreq /= OneMinusSelfProb looks like multiply the block freq (one iteration loop) with the average trip count -- that is why I asked if this applies to other backedges.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103289/new/
https://reviews.llvm.org/D103289
    
    
More information about the llvm-commits
mailing list