[PATCH] D13611: [Polly] Create virtual independent blocks

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 16:17:19 PDT 2015


Meinersbur added a comment.

In http://reviews.llvm.org/D13611#268449, @grosser wrote:

> Hi Johannes,
>
> great to see we will finally get rid of the IndependentBlocks pass. I just had a very first skim over this patch, but did not manage to do a full review yet.
>
> The two main items I would still like to look into:
>
> 1. This seems to conflict with http://reviews.llvm.org/D12975 (Michael's DE-LICM)
>
>   I need to get a better understanding in which ways these patches possibly conflict (as well as the overall design).


To add some details:

http://reviews.llvm.org/D12975 tracks which values flow between ScopStmts which this patch modifies at a very late phase. There should be fewer such implicit flows, but some of those flows might have already be created with origin MAPPED. The array element occupied by this MAPPED flow might be used for some other implicit flow, meaning De-LICM before virtual blocks is ineffective. It is also more difficult to modify MAPPEDs because lifetime issues have to be considered and there is no distinction between SCALAR and PHI origins (not sure how much of a problem this is though).

One of my rationale to do De-LICM before even creating MemoryAccesses is that it is easier to implement (no moving, copying, deleting of MemoryAccesses) and reduced overhead because fewer MemoryAccesses are created in the first place.

So we have the possibilities to either do "simplifyScalarAccesses" before creating MemoryAccesses (e.g. by marking Instructions to where they should be copied) or "De-LICM" after simplifyScalarAccesses.


================
Comment at: lib/Analysis/ScopInfo.cpp:1383
@@ +1382,3 @@
+
+    while (OnlyMA && MALIt != MALEnd && (MA != *MALIt)) {
+      MALLastIt++;
----------------
I do not understand this code. Why did you even remove any comment about what it is doing?

================
Comment at: lib/Analysis/ScopInfo.cpp:2696
@@ +2695,3 @@
+
+void Scop::simplifyScalarAccesses() {
+  using OutsideOperandsSetTy =
----------------
God function antipattern


http://reviews.llvm.org/D13611





More information about the llvm-commits mailing list