[PATCH] D47259: [IPSCCP,PM] Preserve DT in the new pass manager.

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 8 10:29:58 PST 2018


brzycki added a comment.

LGTM and I'm glad to see other passes working to preserve DTU.



================
Comment at: lib/Transforms/Scalar/SCCP.cpp:2080
       }
 
     }
----------------
NutshellySima wrote:
> I would suggest using `DTU.deleteBB(DeadBB)` here which delays BB removal until `flush()` and removing 
> ```
> for (BasicBlock *DeadBB : BlocksToErase)
>       F.getBasicBlockList().erase(DeadBB);
> ```
> below.
> I believe it would make the code more readable.
+1 and it also defers a potentially expensive call to `flush()`.


https://reviews.llvm.org/D47259





More information about the llvm-commits mailing list