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

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 12:46:10 PDT 2017


iteratee 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.
----------------
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.


https://reviews.llvm.org/D31559





More information about the llvm-commits mailing list