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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 25 05:01:26 PST 2019


fhahn added a comment.

I think ideally we would just avoid deleting LCSSA PHI nodes (PHI nodes with a single incoming value in loop exit blocks), but maybe it is too much effort with the info available.



================
Comment at: include/llvm/Transforms/Utils/BasicBlockUtils.h:44
+void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,
+                     bool DontDeleteUselessPHIs = false);
 
----------------
nit: How about KeepUselessPHIs, or KeepSingleValuePHIs, which is a bit more descriptive.


================
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
----------------
I think the relevant -verify-loop-lcssa & co are available without asserts as well, so we should be able to drop REQUIRE: asserts.


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

https://reviews.llvm.org/D57231





More information about the llvm-commits mailing list