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

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 17:54:06 PDT 2017


Thanks Andrew for the comments.

On Tue, May 2, 2017 at 5:49 PM, Andrew Trick via Phabricator
<reviews at reviews.llvm.org> wrote:
> atrick added a comment.
>
> I think the algorithm needs to be explained. It seems reasonable to argue that single def/use live ranges should be kept short. But is there any reason at all to run this before other IR passes?  It seems natural to run this after machine LICM and Sinking.

The algorithm is simple, if the instruction has only one use, and all
its operands inside the same BB has only one use, then I move the
instruction right after the latest def of the operands.

No reason for putting this at IR level except for easy implementation.
I can move it to machine level and place it before RA passes.

Dehao
>
>
> https://reviews.llvm.org/D32563
>
>
>


More information about the llvm-commits mailing list