[PATCH] D28522: Codegen: Make chains from lattice-shaped CFGs

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 14:50:04 PST 2017


iteratee added inline comments.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:624
+      if (Successors.size() > 1
+          && hasSameSuccessors(*Pred, Successors))
+        // This looks like a tail-duplicated block. Skip it.
----------------
davidxl wrote:
> Is it better to relax the condition such that as long as Succ can be dup'd into one of the unplaced predecessors, return true?
That isn't sufficient, because we need layout to be repeatable. So when we encounter the lattice the second time, there will be no more copies left to make. Chandler also wanted to allow another pass besides layout to do the duplication (perhaps with a larger threshold or different heuristic).


https://reviews.llvm.org/D28522





More information about the llvm-commits mailing list