[PATCH] D59688: [X86] Make post-ra scheduling macrofusion-aware.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 06:03:19 PDT 2019


courbet added a comment.

In D59688#1439297 <https://reviews.llvm.org/D59688#1439297>, @andreadb wrote:

> Nice patch Clement!
>
> I always wondered why on x86 we only enabled that mutator in the pre-ra scheduler.
>  In the past, I remember I did some quick experiments with enabling that mutator in the post-RA scheduler. I must admit that I wasn't particularly lucky wih the experiments (i.e. I couldn't find significant/promising improvements). But then - again - those were just quick experiments, and I didn't try it on many codebases. If you think you can share some numbers then that would be great.


Thanks Andrea.

Yes, that's essentially what the comment in X86.td says:

//"This generally gives a nice performance increase on silvermont, with largely neutral behavior on other contemporary large core processors."//

However, that was before the round of scheduling information fixes that Simon & I made based on llvm-exegesis. I wanted to give it another try after that, and from my first experiments it seems that it indeed makes sense to look at it again.
What I have done for now is run our (internal, sorry) main macrobenchmark with post-ra enabled. With the base code I see a **consistent regression** of 0.5% to 1% depending on metrics. With this patch I see a **consistent improvement** of 0.5% to 2%.

> On a slightly different topic: I often wondered whether we - at some point - we should start using the PostMIScheduler for X86.
>  Did you experiment with it?

I'm looking at all the options right now. But I want to make sure that we're comparing apples to apples, and that's why I'm fixing this.

When I'm done experimenting with different possibilities I'll write a summary of the results.

> The API is basically the same; mutators are run on the DAG as part of a dag-postprocessing step. You can try to enable that mutator on that pass too.

Yup, I have another patch coming for this :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59688/new/

https://reviews.llvm.org/D59688





More information about the llvm-commits mailing list