[PATCH] D43176: [LoopInterchange] Incrementally update the dominator tree.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 12:49:44 PST 2018


fhahn added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:465
+
+    AU.addPreserved<DominatorTreeWrapperPass>();
   }
----------------
efriedma wrote:
> This list of preserved passes seems really short; at the very least, it should preserve GlobalsAA.  Would be nice to preserve LoopInfo, LCSSA, and ScalarEvolution; I think the pass needs to preserve them anyway to interact correctly with itself?
Yes, making it preserve the DT is a first step. It indeed relies on  LoopInfo, LCSSA, and ScalarEvolution being preserved too after interchanging 2 loops, for loop nests > 2. 

At least LoopInfo is not preserved properly at the moment. I plan to fix those issues in follow up commits.


================
Comment at: test/Transforms/LoopInterchange/reductions.ll:1
-; RUN: opt < %s -basicaa -loop-interchange -S | FileCheck %s
+; RUN: opt < %s -basicaa -loop-interchange -verify-dom-info -S | FileCheck %s
 
----------------
efriedma wrote:
> Maybe add verify-dom-info to all the LoopInterchange tests?
Will do, thanks


https://reviews.llvm.org/D43176





More information about the llvm-commits mailing list