Path: blob/main/contrib/llvm-project/llvm/lib/Target/X86/MCA/X86CustomBehaviour.h
35294 views
//===-------------------- X86CustomBehaviour.h ------------------*-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 defines the X86CustomBehaviour class which inherits from10/// CustomBehaviour. This class is used by the tool llvm-mca to enforce11/// target specific behaviour that is not expressed well enough in the12/// scheduling model for mca to enforce it automatically.13///14//===----------------------------------------------------------------------===//1516#ifndef LLVM_LIB_TARGET_X86_MCA_X86CUSTOMBEHAVIOUR_H17#define LLVM_LIB_TARGET_X86_MCA_X86CUSTOMBEHAVIOUR_H1819#include "llvm/MCA/CustomBehaviour.h"20#include "llvm/TargetParser/TargetParser.h"2122namespace llvm {23namespace mca {2425class X86InstrPostProcess : public InstrPostProcess {26/// Called within X86InstrPostProcess to specify certain instructions27/// as load and store barriers.28void setMemBarriers(std::unique_ptr<Instruction> &Inst, const MCInst &MCI);2930public:31X86InstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)32: InstrPostProcess(STI, MCII) {}3334~X86InstrPostProcess() = default;3536void postProcessInstruction(std::unique_ptr<Instruction> &Inst,37const MCInst &MCI) override;38};3940} // namespace mca41} // namespace llvm4243#endif444546