[PATCH] D32563: Improve code placement algorithm in Reassociate pass.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 16:11:57 PDT 2017


On Thu, Apr 27, 2017 at 3:44 PM, Daniel Berlin via Phabricator <
reviews at reviews.llvm.org> wrote:

> dberlin added a comment.
>
> The whole point of starting to rewrite-reassociate as n-ary reassociate
> was to have a better framework to handle better reassociation and placement
> issues.
>

The primary goal of reassociation is not to reduce register pressure, but
it has the side effect of changing overlapping live ranges due to the
aggressive code motion it has.  It looks reasonable to me to slightly tame
the over-zealous code motion and make it slightly register pressure aware.



> Reassociate is supposed to be a simple, and dumb, reassociate.
>
>
The simple analysis is done at tree level, which is quite effective is
handling the problem.



> Trying to integrate code placement into it seems like a ... bad plan.
> It's neither structured in a way that you can easily make such a thing
> fast, nor can you really do a good job of it.
>

I think this simple technique can actually do a good job for a lot of cases
with very little added complexity.


> The longer term picture is probably something like

http://gcc.1065356.n8.nabble.com/A-new-gimple-pass-LRS-live-range-shrinking-to-reduce-register-pressure-td495858.html

that is not something that can happen anytime soon.

David



> https://reviews.llvm.org/D32563
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170427/ee668a6d/attachment.html>


More information about the llvm-commits mailing list