[PATCH] D32563: Add LiveRangeShrink pass to shrink live range within BB.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 08:44:53 PDT 2017


danielcdh added a comment.

In https://reviews.llvm.org/D32563#744175, @atrick wrote:

> The time to shrink live ranges is after all the global machine code
>  motion is done if the goal is handle as many cases as possible.
>
> Doing code motion in machine code is tricky because you have to worry
>  about physical registers, flags and such. But those are exactly the
>  things you need to worry about to avoid generating terrible code. For
>  example, you don't want to hoist something over a call that defines a
>  physreg or is used by a physreg copy!
>
> That said, if reassociate is making silly decisions about where to
>  place operations, I wouldn't see a problem fixing that directly.


We initially tried to fix it in reassociate, but decided to have it fixed separate because we do not want reassociate to become too complicated. And also this should also be able to fix live-range issues introduced by user. I'll try to move this pass to Machine level.


https://reviews.llvm.org/D32563





More information about the llvm-commits mailing list