[PATCH] D45943: [PM/LoopUnswitch] Begin teaching SimpleLoopUnswitch to use the new update API for dominators rather than doing manual, hacky updates.

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 13:51:47 PDT 2018


sanjoy accepted this revision.
sanjoy added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:886
+  // Record the domtree updates for the new blocks.
+  SmallPtrSet<BasicBlock *, 4> SuccSet;
+  for (auto *ClonedBB : NewBlocks) {
----------------
The DT update mechanism gets rid of duplicates anyway (see `LegalizeUpdates`), so `SuccSet` should not be necessary (unless you expect a lot of duplicates at which point it can serve to save memory).


Repository:
  rL LLVM

https://reviews.llvm.org/D45943





More information about the llvm-commits mailing list