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

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 14:31:23 PDT 2017


wmi added a comment.

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

> Why are the adds "sunk down" in the first place? Is this reassociation at work?


Yes, reassociation for an expression tree inserts the intermediate result directly before the final root. That is how the adds sunk down.

> Machine global code motion, using MachineTraceMetrics and RegisterPressure would be awesome. Nobody really followed through with implementing it so unfortunately there's no switch to turn on to try it.

The machine global code motion you mention here is misched or a separate pass? We found existing machine scheduling can do some live range shrinking in some cases, but we don't know whether depending on existing register pressure aware scheduing and improving it is a good way to solve the live range shrinking problem generally. Could you shed some light on how existing misched choose between maximizing ILP and minimizing register pressure?

Thanks,
Wei.


https://reviews.llvm.org/D32563





More information about the llvm-commits mailing list