[PATCH] D53055: [MCA] Limit the number of bytes fetched per cycle.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 10 03:23:13 PDT 2018


andreadb added reviewers: courbet, gchatelet, RKSimon, atrick.
andreadb added a subscriber: courbet.
andreadb added a comment.

Hi Owen,

The default pipeline in llvm-mca doesn't simulate any hardware frontend logic.

The `Fetch Stage` in llvm-mca is only responsible for creating instructions and moving them to the next pipeline stage.
It doesn't have to be confused with the Fetch logic in the hardware frontend, which - as you wrote - is responsible for fetching portions of a cache line every cycle, and feed them to the decoders via an instruction byte queue.

The llvm-mca Fetch stage is equivalent to an unbounded queue of already decoded instructions. Instructions from every iteration are immediately available at cycle 0.

About the topic of simulating the hardware frontend logic:
----------------------------------------------------------

There is already bug https://bugs.llvm.org/show_bug.cgi?id=36665, which is about adding support for simulating the hardware frontend logic.
I know that @courbet  and his team would like to work on it. So, you can probably try to work with them on this.
Unfortunately, that bugzilla must be updated. There is not enough information there (I suggested to send a detailed RFC upstream in case).

I strongly suggest you/your team/Clement's team to work together on that task. I am afraid that people may be working on the same tasks in parallel.. That has to be avoided.
You can use that bugzilla to coordinate your work upsteam on this.

Now that llvm-mca is a library, people can define their own custom pipeline without having to modify the "default pipeline stages".
In particular, I don't want to introduce any frontend concepts in the default pipeline of llvm-mca.
For now, any frontend simulation should be implemented by stages that are not part of the default pipeline. The default pipeline should only stay focused on simulating the hardware backend logic.

In future, Subtargets will be able to declare custom pipelines via tablegen.
The default pipeline would only be be used by subtargets that don't provide/specify their own custom pipeline.
That being said, this is a long term goal, and it has to be properly discussed in an RFC. It will also affect the future of PR36665.

-Andrea


Repository:
  rL LLVM

https://reviews.llvm.org/D53055





More information about the llvm-commits mailing list