[PATCH] D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication.

Huihui Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 16:20:42 PST 2019


huihuiz added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2976
+      continue;
+    if (&BBChain != BlockToChain[Pred] && BBChain.UnscheduledPredecessors != 0)
+      --BBChain.UnscheduledPredecessors;
----------------
Carrot wrote:
> Here if BBChain.UnscheduledPredecessors == 0, then there is something wrong.
already guarded under "BBChain.UnscheduledPredecessors != 0"


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2979
+
+    if (Pred == LPred || PredChain == &Chain)
       continue;
----------------
Carrot wrote:
> This condition also applies to your code, so the original if statement should not be changed.
Yes, I was also debating about this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70030/new/

https://reviews.llvm.org/D70030





More information about the llvm-commits mailing list