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

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 08:37:48 PST 2019


Carrot added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2976
+      continue;
+    if (&BBChain != BlockToChain[Pred] && BBChain.UnscheduledPredecessors != 0)
+      --BBChain.UnscheduledPredecessors;
----------------
huihuiz wrote:
> Carrot wrote:
> > Here if BBChain.UnscheduledPredecessors == 0, then there is something wrong.
> already guarded under "BBChain.UnscheduledPredecessors != 0"
You should not hide this kind of compiler internal error. Even do nothing is better than hide it. Of course a better choice is assert it.



================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:3039
+    //  Succ0 Succ1 [BBChain]
+    if (&BBChain != BlockToChain[Pred] && BBChain.UnscheduledPredecessors != 0)
+      --BBChain.UnscheduledPredecessors;
----------------
Replace BlockToChain[Pred] with PredChain.


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