[PATCH] D17830: [MBP] Avoid placing random blocks between loop preheader and header

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 16:00:46 PST 2016


congh accepted this revision.
congh added a comment.

Great fix! Then we can ignore any predecessors in the same chain and treat the chain as a single node, in which case the chain should always be a loop chain.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:210
@@ -209,3 +209,3 @@
   /// in-loop predecessors of this chain.
   unsigned LoopPredecessors;
 };
----------------
chandlerc wrote:
> reames wrote:
> > As a side note, the name of this variable is highly misleading.  When scheduling function chains, this is used to track unscheduled predecessors outside of any loop.  Once this change is in, I'd like to rename this to something more meaningful.  Any suggestions?
> No real idea. =/ I agree, it was bad when it started and it has gotten worse.
Maybe ChainPredecessors? But in loops this may also be misleading. If we treat the function as a loop body, maybe ChainPredecessorsInLoop is better?


http://reviews.llvm.org/D17830





More information about the llvm-commits mailing list