diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2019-10-11 20:26:08 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2019-10-11 20:26:08 +0000 |
| commit | cf1ba238d4f752133897af1773e85056b1492803 (patch) | |
| tree | 72ae269f59cdc31ded2bfea67cd28e756f198541 /llvm/lib/Target | |
| parent | 9c36ec5941730364d4b9befd15e20365a039a2f1 (diff) | |
| download | bcm5719-llvm-cf1ba238d4f752133897af1773e85056b1492803.tar.gz bcm5719-llvm-cf1ba238d4f752133897af1773e85056b1492803.zip | |
[Mips][llvm-exegesis] Add a Mips target
The target does just enough to be able to run llvm-exegesis in latency
mode for at least some opcodes.
Patch by Miloš Stojanović.
Differential Revision: https://reviews.llvm.org/D68649
llvm-svn: 374590
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Mips/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/Mips.td | 6 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsPfmCounters.td | 18 |
3 files changed, 25 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/CMakeLists.txt b/llvm/lib/Target/Mips/CMakeLists.txt index 251d1383411..0ac2d8a687d 100644 --- a/llvm/lib/Target/Mips/CMakeLists.txt +++ b/llvm/lib/Target/Mips/CMakeLists.txt @@ -13,6 +13,7 @@ tablegen(LLVM MipsGenMCPseudoLowering.inc -gen-pseudo-lowering) tablegen(LLVM MipsGenRegisterBank.inc -gen-register-bank) tablegen(LLVM MipsGenRegisterInfo.inc -gen-register-info) tablegen(LLVM MipsGenSubtargetInfo.inc -gen-subtarget) +tablegen(LLVM MipsGenExegesis.inc -gen-exegesis) add_public_tablegen_target(MipsCommonTableGen) diff --git a/llvm/lib/Target/Mips/Mips.td b/llvm/lib/Target/Mips/Mips.td index 0e5a5830374..a5908362e81 100644 --- a/llvm/lib/Target/Mips/Mips.td +++ b/llvm/lib/Target/Mips/Mips.td @@ -263,3 +263,9 @@ def Mips : Target { let AssemblyParserVariants = [MipsAsmParserVariant]; let AllowRegisterRenaming = 1; } + +//===----------------------------------------------------------------------===// +// Pfm Counters +//===----------------------------------------------------------------------===// + +include "MipsPfmCounters.td" diff --git a/llvm/lib/Target/Mips/MipsPfmCounters.td b/llvm/lib/Target/Mips/MipsPfmCounters.td new file mode 100644 index 00000000000..c7779b474b9 --- /dev/null +++ b/llvm/lib/Target/Mips/MipsPfmCounters.td @@ -0,0 +1,18 @@ +//===-- MipsPfmCounters.td - Mips Hardware Counters --------*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This describes the available hardware counters for Mips. +// +//===----------------------------------------------------------------------===// + +def CpuCyclesPfmCounter : PfmCounter<"CYCLES">; + +def DefaultPfmCounters : ProcPfmCounters { + let CycleCounter = CpuCyclesPfmCounter; +} +def : PfmCountersDefaultBinding<DefaultPfmCounters>; |

