[PATCH] D11662: Filter cold blocks off the loop chain when profile data is available.

Xinliang David Li davidxl at google.com
Fri Jul 31 14:44:22 PDT 2015


I suggest making it an option. The other usage is slightly different
-- we can leave it out for now (if needed can be changed later).

David

On Fri, Jul 31, 2015 at 2:41 PM, Cong Hou <congh at google.com> wrote:
> congh added inline comments.
>
> ================
> Comment at: lib/CodeGen/MachineBlockPlacement.cpp:826
> @@ +825,3 @@
> +    // We use the threshold 20% here to filter cold blocks.
> +    const unsigned LoopToColdBBRatio = 5;
> +    for (MachineBasicBlock *LoopBB : L.getBlocks()) {
> ----------------
> davidxl wrote:
>> Try to avoid hard-coding parameter like this.
> Should I make it a global constant variable or an option? The other 20% probability used in selectBestSuccessor() is also hard-coded and we could use the same variable to replace them.
>
>
> http://reviews.llvm.org/D11662
>
>
>



More information about the llvm-commits mailing list