[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 13:00:18 PDT 2015
congh added a comment.
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);
----------------
djasper wrote:
> 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);
----------------
djasper wrote:
> 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).
http://reviews.llvm.org/D10717
More information about the llvm-commits
mailing list