[PATCH] D47385: [Polly][ForwardOpTree] Use less computationally expensive method to compute def-to-target map. NFCI.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 25 12:20:40 PDT 2018


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

When forwarding a LoadInst to another statement, a map that translates their domain is needed. Before this patch, is was computed by appending the def-to-use map to the def-to-target of the operand tree's target. This patch lets the new method `getDefToTarget` to is. This is computationally less expensive due to:

- Caching of the result such that it can be used for multiple operands tree to the same target.
- The map is only computed when there is a LoadInst that needs it.
- It is only computed for the statement requiring the translator map, instead of having an intermediate result for every edge in the operand tree.

The downside is that this scheme cannot handle forwarding from a previous loop iteration (which would require the entire path from statement to target). Since ForwardOpTree currently does not support forwarding across loop iterations, this was not needed anyway.

This was written in reaction to the compilation timeout in GrTestUtils.cpp by the aosp-O3-polly-before-vectorizer-unprofitable buildbot <http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable>. This patch may not solve the timeout itself, but would enable other mitigations such as reducing the max-computations limit for ForwardOptree or drastically simplifying the computations needed for the translator map if the schedule is still the original from ScopInfo.


Repository:
  rPLO Polly

https://reviews.llvm.org/D47385

Files:
  lib/Transform/ForwardOpTree.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47385.148646.patch
Type: text/x-patch
Size: 13426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180525/91c2b74e/attachment.bin>


More information about the llvm-commits mailing list