[PATCH] D70030: [MachineBlockPlacement] Update UnscheduledPredecessors when tail duplicate delete a block.

Huihui Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 16:05:58 PST 2019


huihuiz added a comment.

Adding some more detailed explanation:

When tail duplicator duplicate BB into its predecessor, for cases tail duplicator decides to delete BB:

  PredBB [PredChain]                PredBB [PredChain]
       \                             /  \
        BB [BBChain]         =>   Succ0  Succ1
       /   \
  Succ0 Succ1

For cases PredChain is different from BBChain, the UnscheduledPredecessors will be set to 1 for BBChain during fillWorkLists.
Assuming Succ1's BlockChain is equal to BBChain.
The previously set UnscheduledPredecessors for BBChain will not be decreased. Because Succ1 may not be included in the BlockFilter associated with the Loop of PredBB.
Since LoopBlockSet is collected at the very beginning of buildLoopChains, and tail duplication will not update the BlockFilter(LoopBlockSet).


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