[PATCH] D47752: [Polly][OpTree] Introduce shortcut for computing the def->target mapping. NFCI.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 18:22:40 PDT 2018


Meinersbur created this revision.
Meinersbur added reviewers: grosser, eli.friedman, philip.pfaffe.
Meinersbur added a project: Polly.
Herald added a reviewer: bollu.

In case the schedule has not changed and the operand tree root uses a value defined in an ancestor loop, the def-to-target mapping is trivial. Let the SCoP be

      for (int i < 0; i < N; i+=1) {
    DefStmt:
      D = ...;
      for (int j < 0; j < N; j+=1) {
    TargetStmt:
       use(D);
    }
  }

then the DefStmt-to-TargetStmt mapping is

  { DefStmt[i] -> TargetStmt[i,j] }

This case should apply on the majority of cases. This patch detects this case and directly construct the expected mapping. This assumes that the mapping never crosses the loop header DefStmt is in, which ForwardOpTree does not support at the moment anyway.

This should fix the timeout while compiling GrTestUtils.cpp of the Qualcom aosp buildbot. It still needs nearly 5 minutes to compile (which should be below the timeout), but no noticeable time is spent in the getDefToTarget function anymore.


Repository:
  rPLO Polly

https://reviews.llvm.org/D47752

Files:
  include/polly/ScopInfo.h
  lib/Analysis/ScopInfo.cpp
  lib/Transform/ForwardOpTree.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47752.149881.patch
Type: text/x-patch
Size: 4021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180605/01fdbc76/attachment-0001.bin>


More information about the llvm-commits mailing list