[PATCH] D47385: [Polly][ForwardOpTree] Use less computationally expensive method to compute def-to-target map. NFCI.
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sat May 26 02:53:20 PDT 2018
This is a very good idea. I am out of office, but will review this Sunday night.
Tobias
On Fri, May 25, 2018, at 21:20, Michael Kruse via Phabricator wrote:
> 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
>
> Email had 1 attachment:
> + D47385.148646.patch
> 18k (text/x-patch)
More information about the llvm-commits
mailing list