[PATCH] D46741: [llvm-mca] Introduce a pipeline Stage class and FetchStage.
Matt Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 13:41:09 PDT 2018
mattd updated this revision to Diff 146671.
mattd marked 11 inline comments as done.
mattd added a comment.
- Cleaned up the code per items mentioned in the comments.
- I added a single stage to Backend.h, in the future this will be a list of stages that represent the instruction pipeline. This patch is about introducing the Stage and FetchStage idea.
- As suggested, the Instruction list is now owned by the Fetch stage, since that stage produces the instructions.
- I wonder if it would be cleaner to have an InstructionManager class, that manages the list of Instructions?
- When the Backend instantiates the stages of the pipeline, it would also pass a reference to the InstructionManager instance to the stages.
- The callback to Backend::eraseInstruction is still there, however, that routine now invokes the Fetch stage to remove the specified Instruction instance. I don't like that indirection, but that would be a different patch. Specifically, once we add eventing to the Stages, then that functionality would be completely removed from the Backend.
- If we take the InstructionManager idea, then that would eliminate the eraseInstruction definition from Backend and any Stage.
https://reviews.llvm.org/D46741
Files:
tools/llvm-mca/Backend.cpp
tools/llvm-mca/Backend.h
tools/llvm-mca/CMakeLists.txt
tools/llvm-mca/FetchStage.cpp
tools/llvm-mca/FetchStage.h
tools/llvm-mca/Stage.cpp
tools/llvm-mca/Stage.h
tools/llvm-mca/llvm-mca.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46741.146671.patch
Type: text/x-patch
Size: 12788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180514/a4eda7ca/attachment.bin>
More information about the llvm-commits
mailing list