[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 19 15:45:52 PDT 2015
congh added inline comments.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:920
@@ +919,3 @@
+ // 1. If the tail node has only one successor, then we will get an
+ // additional jmp instruction. So the cost here is (MisfetchCost +
+ // JumpInstCost) * tail node frequency.
----------------
davidxl wrote:
> The situation is
>
> TailBB->currentChainHead
> TailBB->OtherSucessor
>
> After rotation, TailBB->OtherSuccessor may be a fall through, so there is no need for a jump for that case. If OtherSuccessor is inside the chain, then a jmp is definitely needed.
OK. This makes sense. As we don't know the layout successor of the loop chain, we only need to update this comment.
http://reviews.llvm.org/D10717
More information about the llvm-commits
mailing list