[llvm-commits] µop fusion

Andrew Trick atrick at apple.com
Sat May 26 00:15:34 PDT 2012


On May 25, 2012, at 7:38 PM, Hal Finkel wrote:

> Also, regarding Jakob's point about the µops and the scheduling, should
> we try to teach the instruction scheduler about µop fusing? Would this
> be as simple as preferring a next instruction fusable with the current
> one, or would be need to take reordering into account as well?

Yes. The SD scheduler makes a best effort to schedule cmp+jmp (-disable-sched-physreg-join=false). The MI scheduler should eventually do the same. By best effort, I mean that there is a bias toward scheduling them together, but other constraints always win if present. In MIsched we could do this as a prepass that decides whether to fuse or split cmp+jmp based on the cmp height and critical path/resource height.

There is one common case that requires reordering (breaking vreg antidependence), where we fail now but we will optimize with MI scheduler. We need to fix copy placement so we don't end up with this:

cmp %vr-preinc
%vr-preinc = mov %vr-postinc
jne %loop

We plan to make live interval update strong enough that we can insert new copies and remove others by coalescing on the fly.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120526/d8723eef/attachment.html>


More information about the llvm-commits mailing list