[PATCH] D10717: Enhance loop rotation with existence of profile data in MachineBlockPlacement pass.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 15:33:04 PDT 2015
davidxl 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.
----------------
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.
http://reviews.llvm.org/D10717
More information about the llvm-commits
mailing list