[PATCH] D84886: Create LoopNestPass

2020-09-02 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu added a comment. Hi, thanks for your comments and suggestions! I've thought about the suggestion by @ychen to extend the existing `LoopPassManager` to handle loop-nest passes instead of having a separate `LoopNestPassManager`, and I've uploaded a new patch D87045

[PATCH] D84886: Create LoopNestPass

2020-08-19 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. > I was trying to convert the LoopInterchange pass into a loop-nest pass. > However, there seems to be no corresponding loop pass for the NPM. > Any particular reason for this? That's true, LoopInterchange pass is not already ported to the NPM, likely because no one

[PATCH] D84886: Create LoopNestPass

2020-08-18 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu added a comment. Hi @Whitney, @fhahn, @ychen, thank you all for your comments and suggestions! Sorry about the late reply. I was trying to convert the `LoopInterchange` pass into a loop-nest pass. However, there seems to be no corresponding loop pass for the NPM. Any particular reason

[PATCH] D84886: Create LoopNestPass

2020-08-12 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added a comment. Examples of existing transformations that can be benefited from LoopNestPass: LoopInterchange, LoopUnrollAndJam, LoopFusion, LoopIdiom, LoopDistribution, ... And their corresponding cost model analyses can be benefited from LoopNestAnalysis, e.g. LoopCacheCost.

[PATCH] D84886: Create LoopNestPass

2020-08-12 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D84886#2212202 , @TaWeiTu wrote: > @ychen Again, thanks for your comment! > > 1. Currently, `LoopInterchange` returns immediately if the loop is not a > top-level one. The main purpose of the loop nest pass is to prevent >

[PATCH] D84886: Create LoopNestPass

2020-08-11 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu added a comment. @ychen Again, thanks for your comment! 1. Currently, `LoopInterchange` returns immediately if the loop is not a top-level one. The main purpose of the loop nest pass is to prevent situations like this and possibly save compiling time of uninteresting calls to `run`. 2.

[PATCH] D84886: Create LoopNestPass

2020-08-11 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Hello, sorry for the late reply. I have some high-level questions - What are existing and future loop passes/analyses that could benefit from using LoopNestPass? - I'd feel more comfortable if existing loop pass/analysis managers could be extended to handle LoopNestPass,

[PATCH] D84886: Create LoopNestPass

2020-08-10 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu added a comment. Ping. @ychen Thank you for your comment! I've added some unittests. Please let me know if there's anything unclear about the intended usage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84886/new/

[PATCH] D84886: Create LoopNestPass

2020-08-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. I think this needs unit tests like LoopPassManagerTest.cpp (in that file or a similarly named file) to demonstrate the expected behavior: the expected usage comparing with LoopPass/LoopAnalysisPass, how the adaptor is used and the invalidation interaction within its pass

[PATCH] D84886: Create LoopNestPass

2020-07-31 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu updated this revision to Diff 282145. TaWeiTu added a comment. Fix LoopRotate/pr35210.ll (sync with commit b36c39260edcded47436f344e48f78cfbedac494 ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84886: Create LoopNestPass

2020-07-30 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu updated this revision to Diff 281985. TaWeiTu removed reviewers: jdoerfert, sstefan1, DavidTruby, aartbik, ftynse, baziotis, libc++. TaWeiTu removed projects: MLIR, libc-project, OpenMP, libc++, LLDB, Sanitizers. TaWeiTu added a comment. Propagate the requirement of MemorySSA from loop

[PATCH] D84886: Create LoopNestPass

2020-07-30 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu updated this revision to Diff 281954. TaWeiTu added a comment. Fix loop deletion and rotation tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84886/new/ https://reviews.llvm.org/D84886 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D84886: Create LoopNestPass

2020-07-30 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu updated this revision to Diff 281907. TaWeiTu added a comment. Fix LOOP_NEST_ANALYSIS macro, clang-tidy warnings. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84886/new/ https://reviews.llvm.org/D84886 Files:

[PATCH] D84886: Create LoopNestPass

2020-07-30 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu updated this revision to Diff 281881. TaWeiTu added a comment. Herald added a reviewer: bollu. Fix several pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84886/new/ https://reviews.llvm.org/D84886 Files:

[PATCH] D84886: Create LoopNestPass

2020-07-29 Thread Ta-Wei Tu via Phabricator via cfe-commits
TaWeiTu created this revision. TaWeiTu added reviewers: Whitney, etiotto, fedor.sergeev, chandlerc. Herald added subscribers: llvm-commits, cfe-commits, asbirlea, dexonsmith, steven_wu, hiraditya, mgorny. Herald added projects: clang, LLVM. TaWeiTu requested review of this revision. Per