[PATCH] D12758: Allow general loops with one latch

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 10:24:24 PDT 2015


I agree with most comments but I am kinda busy right now. I will come
back to this though.

On 09/10, Michael Kruse wrote:
> Meinersbur accepted this revision.
> 
> ================
> Comment at: include/polly/ScopInfo.h:654
> @@ -655,3 +653,3 @@
>  
> -  std::vector<Loop *> NestLoops;
> +  SmallVector<Loop *, 4> NestLoops;
>  
> ----------------
> This change looks unrelated
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:981
> @@ +980,3 @@
> +    isl_id *DimId = isl_set_get_dim_id(Domain, isl_dim_set, u);
> +    NestLoops.push_back(static_cast<Loop *>(isl_id_get_user(DimId)));
> +    isl_id_free(DimId);
> ----------------
> Can we have an assert here to ensure that the id has been set before?
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:1494
> @@ -1473,1 +1493,3 @@
>  
> +static inline __isl_give isl_set *addDomainDimId(__isl_take isl_set *Domain,
> +                                                 unsigned Dim, Loop *L) {
> ----------------
> Rename to setDomainDimId?
> "add" made me think it would append another dimension.
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:1515
> @@ +1514,3 @@
> +  Loop *L = LI.getLoopFor(EntryBB);
> +  while (LD-- >= 0) {
> +    S = addDomainDimId(S, LD + 1, L);
> ----------------
> for (int LD = getRelativeLoopDepth(LI.getLoopFor(EntryBB)); LD >= 0; LD-=1)
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:2137
> @@ +2136,3 @@
> +  Loop *L = getLoopSurroundingRegion(R, LI);
> +  LoopSchedules[L];
> +  buildSchedule(&R, TempScop, LI, SD, LoopSchedules);
> ----------------
> This may make sense to create an element, but looks wrong.
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:2139
> @@ -2042,1 +2138,3 @@
> +  buildSchedule(&R, TempScop, LI, SD, LoopSchedules);
> +  Schedule = LoopSchedules[L].first;
>  
> ----------------
>     Schedule = LoopSchedules.count(L) ? LoopSchedules[L].first : nullptr;
> as alternative to line 2137
> 
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:2547
> @@ +2546,3 @@
> +    while (L && NumVisited == L->getNumBlocks()) {
> +      auto *LDomain = isl_schedule_get_domain(LSchedulePair.first);
> +      if (auto *MUPA = mapToDimension(LDomain, LD + 1))
> ----------------
> isl_set *LDomain
> 
> ================
> Comment at: lib/Analysis/ScopInfo.cpp:2552
> @@ +2551,3 @@
> +
> +      auto *PL = L->getParentLoop();
> +      assert(LoopSchedules.count(PL));
> ----------------
> Loop *PL
> 
> ================
> Comment at: lib/Support/ScopHelper.cpp:36
> @@ -35,3 @@
> -// Cast the region to loop if there is a loop have the same header and exit.
> -Loop *polly::castToLoop(const Region &R, LoopInfo &LI) {
> -  BasicBlock *entry = R.getEntry();
> ----------------
> Really good this finally does away
> 
> 
> http://reviews.llvm.org/D12758
> 
> 
> 

-- 

Johannes Doerfert
Researcher / PhD Student

Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.31

Tel. +49 (0)681 302-57521 : doerfert at cs.uni-saarland.de
Fax. +49 (0)681 302-3065  : http://www.cdl.uni-saarland.de/people/doerfert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150910/0b6b32e1/attachment.sig>


More information about the llvm-commits mailing list