[PATCH] D31559: CodeGen: BlockPlacement: Minor probability changes.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 11:10:28 PDT 2017


davidxl added inline comments.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:801
+  // Let F = SuccFreq - Qin
+  // is Qout + max(F, Qin) * U + min(F, Qin)
   // compare P + U vs Qout + P * U + Qin.
----------------
iteratee wrote:
> davidxl wrote:
> > should it be 
> > 
> > min (Qout + F + Qin * U,  Qout + Qin + F * U)?
> They work out to be the same. I think it's simpler to compute the min/max over 2 block frequencies, rather than over a total.
Is it always the same?


https://reviews.llvm.org/D31559





More information about the llvm-commits mailing list