Path: blob/main/contrib/llvm-project/llvm/lib/MCA/CustomBehaviour.cpp
35260 views
//===--------------------- CustomBehaviour.cpp ------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7/// \file8///9/// This file implements methods from the CustomBehaviour interface.10///11//===----------------------------------------------------------------------===//1213#include "llvm/MCA/CustomBehaviour.h"1415namespace llvm {16namespace mca {1718CustomBehaviour::~CustomBehaviour() = default;1920unsigned CustomBehaviour::checkCustomHazard(ArrayRef<InstRef> IssuedInst,21const InstRef &IR) {22// 0 signifies that there are no hazards that need to be waited on23return 0;24}2526std::vector<std::unique_ptr<View>>27CustomBehaviour::getStartViews(llvm::MCInstPrinter &IP,28llvm::ArrayRef<llvm::MCInst> Insts) {29return std::vector<std::unique_ptr<View>>();30}3132std::vector<std::unique_ptr<View>>33CustomBehaviour::getPostInstrInfoViews(llvm::MCInstPrinter &IP,34llvm::ArrayRef<llvm::MCInst> Insts) {35return std::vector<std::unique_ptr<View>>();36}3738std::vector<std::unique_ptr<View>>39CustomBehaviour::getEndViews(llvm::MCInstPrinter &IP,40llvm::ArrayRef<llvm::MCInst> Insts) {41return std::vector<std::unique_ptr<View>>();42}4344UniqueInstrument InstrumentManager::createInstrument(llvm::StringRef Desc,45llvm::StringRef Data) {46return std::make_unique<Instrument>(Desc, Data);47}4849SmallVector<UniqueInstrument>50InstrumentManager::createInstruments(const MCInst &Inst) {51return SmallVector<UniqueInstrument>();52}5354unsigned InstrumentManager::getSchedClassID(55const MCInstrInfo &MCII, const MCInst &MCI,56const llvm::SmallVector<Instrument *> &IVec) const {57return MCII.get(MCI.getOpcode()).getSchedClass();58}5960} // namespace mca61} // namespace llvm626364