[all-commits] [llvm/llvm-project] ef16c8: Reapply "[MCA] Adding the CustomBehaviour class to...

Patrick Holland via All-commits all-commits at lists.llvm.org
Wed Jun 16 08:57:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef16c8eaa5cd567975956ec0b52b3648365a8ba1
      https://github.com/llvm/llvm-project/commit/ef16c8eaa5cd567975956ec0b52b3648365a8ba1
  Author: Patrick Holland <patrickeholland at gmail.com>
  Date:   2021-06-16 (Wed, 16 Jun 2021)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-mca.rst
    M llvm/include/llvm/MCA/Context.h
    A llvm/include/llvm/MCA/CustomBehaviour.h
    M llvm/include/llvm/MCA/HWEventListener.h
    M llvm/include/llvm/MCA/Instruction.h
    M llvm/include/llvm/MCA/Stages/InOrderIssueStage.h
    M llvm/lib/MCA/CMakeLists.txt
    M llvm/lib/MCA/Context.cpp
    A llvm/lib/MCA/CustomBehaviour.cpp
    M llvm/lib/MCA/InstrBuilder.cpp
    M llvm/lib/MCA/Stages/InOrderIssueStage.cpp
    M llvm/tools/llvm-mca/CMakeLists.txt
    M llvm/tools/llvm-mca/Views/DispatchStatistics.cpp
    A llvm/tools/llvm-mca/lib/AMDGPU/AMDGPUCustomBehaviour.cpp
    A llvm/tools/llvm-mca/lib/AMDGPU/AMDGPUCustomBehaviour.h
    A llvm/tools/llvm-mca/lib/AMDGPU/CMakeLists.txt
    A llvm/tools/llvm-mca/lib/CMakeLists.txt
    M llvm/tools/llvm-mca/llvm-mca.cpp

  Log Message:
  -----------
  Reapply "[MCA] Adding the CustomBehaviour class to llvm-mca".

The original change was pushed in main as commit f7a23ecece52.
It was then reverted by commit a04f01bab2 because it caused linker failures
on buildbots that don't build the AMDGPU target.

--

Some instructions are not defined well enough within the target’s scheduling
model for llvm-mca to be able to properly simulate its behaviour. The ideal
solution to this situation is to modify the scheduling model, but that’s not
always a viable strategy. Maybe other parts of the backend depend on that
instruction being modelled the way that it is. Or maybe the instruction is quite
complex and it’s difficult to fully capture its behaviour with tablegen. The
CustomBehaviour class (which I will refer to as CB frequently) is designed to
provide intuitive scaffolding for developers to implement the correct modelling
for these instructions.

More details are available in the original commit log message (f7a23ecece52).

Differential Revision: https://reviews.llvm.org/D104149




More information about the All-commits mailing list