[all-commits] [llvm/llvm-project] ecf372: [llvm-mca][RISCV] vsetivli and vsetvli act as inst...

Michael Maitland via All-commits all-commits at lists.llvm.org
Thu Jul 6 15:14:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecf372f993fa0f1ae417a3159e5c397f36c2d48c
      https://github.com/llvm/llvm-project/commit/ecf372f993fa0f1ae417a3159e5c397f36c2d48c
  Author: Michael Maitland <michaeltmaitland at gmail.com>
  Date:   2023-07-06 (Thu, 06 Jul 2023)

  Changed paths:
    M llvm/include/llvm/MCA/CustomBehaviour.h
    M llvm/lib/MCA/CustomBehaviour.cpp
    M llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.cpp
    M llvm/lib/Target/RISCV/MCA/RISCVCustomBehaviour.h
    A llvm/test/tools/llvm-mca/RISCV/no-vsetvli-to-start.s
    A llvm/test/tools/llvm-mca/RISCV/vsetivli-lmul-instrument.s
    A llvm/test/tools/llvm-mca/RISCV/vsetvli-lmul-instrument.s
    M llvm/tools/llvm-mca/CodeRegion.h
    M llvm/tools/llvm-mca/CodeRegionGenerator.cpp
    M llvm/tools/llvm-mca/CodeRegionGenerator.h

  Log Message:
  -----------
  [llvm-mca][RISCV] vsetivli and vsetvli act as instruments

Since the LMUL data that is needed to create an instrument is
avaliable statically from vsetivli and vsetvli instructions,
LMUL instruments can be automatically generated so that clients
of the tool do no need to manually insert instrument comments.

Instrument comments may be placed after a vset{i}vli instruction,
which will override instrument that was automatically inserted.
As a result, clients of llvm-mca instruments do not need to update
their existing instrument comments. However, if the instrument
has the same LMUL as the vset{i}vli, then it is reccomended to
remove the instrument comment as it becomes redundant.

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




More information about the All-commits mailing list