[PATCH] D57231: [LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocks

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 03:08:11 PST 2019


mkazantsev marked 2 inline comments as done.
mkazantsev added inline comments.


================
Comment at: include/llvm/Transforms/Utils/BasicBlockUtils.h:44
+void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,
+                     bool DontDeleteUselessPHIs = false);
 
----------------
fhahn wrote:
> nit: How about KeepUselessPHIs, or KeepSingleValuePHIs, which is a bit more descriptive.
I used exactly the same name as existing function `removePredecessor` has. We can make a follow-up refactoring to change them all, but so far I'd prefer to keep things uniform.


================
Comment at: test/Transforms/LoopSimplifyCFG/lcssa.ll:2
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; XFAIL: *
 ; REQUIRES: asserts
 ; RUN: opt -S -enable-loop-simplifycfg-term-folding=true -loop-simplifycfg -verify-loop-info -verify-dom-info -verify-loop-lcssa < %s | FileCheck %s
----------------
fhahn wrote:
> I think the relevant -verify-loop-lcssa & co are available without asserts as well, so we should be able to drop REQUIRE: asserts.
I didn't check that. We can do it as follow-up if it works.


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

https://reviews.llvm.org/D57231





More information about the llvm-commits mailing list