[PATCH] D10717: Enhance loop rotation with existence of profile data in MachineBlockPlacement pass.

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 12:58:32 PDT 2015


On Wed, Oct 7, 2015 at 8:25 AM, Daniel Jasper <djasper at google.com> wrote:

> djasper added a comment.
>
> Just a minor comment about the wording of the options. Otherwise, I don't
> think I'll add much to the reviews by both Chandler and David.
>

Thanks for reviewing those patches, Daniel! (Sorry for the delayed reply as
I just came back from vacation).


>
>
> ================
> Comment at: lib/CodeGen/MachineBlockPlacement.cpp:93
> @@ +92,3 @@
> +    cl::desc("Cost that models the probabalistic risk of an instruction "
> +             "misfetch due to a jump relative to falling through."),
> +    cl::init(1), cl::Hidden);
> ----------------
> In what way is the cost "relative"?
>
> In my understanding, this can either mean that it is a difference or a
> ratio. In either case "unsigned" would be a weird data type.
>

Here we assume that fall-through will have zero cost comparing to 1 for
non-fall-through. As this is not a "relative" cost, I have updated this
description to:

Cost that models the probabilistic risk of an instruction misfetch due to a
jump comparing to falling through, whose cost is zero.



>
> ================
> Comment at: lib/CodeGen/MachineBlockPlacement.cpp:99
> @@ +98,3 @@
> +    cl::desc(
> +        "Relative cost of jump instructions comparing to cost of
> misfethch."),
> +    cl::init(1), cl::Hidden);
> ----------------
> Same as above, what do you actually mean by "relative"?
>

This is a relative cost: if the cost of a misfetch is 1, then we assume the
cost of a jump instruction is also 1 (we can adjust those two options to
change their ratio if necessary).


Cong


>
>
>
>
> http://reviews.llvm.org/D10717
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151012/0410c313/attachment.html>


More information about the llvm-commits mailing list