LLVM  15.0.0git
X86CustomBehaviour.h
Go to the documentation of this file.
1 //===-------------------- X86CustomBehaviour.h ------------------*-C++ -* -===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 ///
10 /// This file defines the X86CustomBehaviour class which inherits from
11 /// CustomBehaviour. This class is used by the tool llvm-mca to enforce
12 /// target specific behaviour that is not expressed well enough in the
13 /// scheduling model for mca to enforce it automatically.
14 ///
15 //===----------------------------------------------------------------------===//
16 
17 #ifndef LLVM_LIB_TARGET_X86_MCA_X86CUSTOMBEHAVIOUR_H
18 #define LLVM_LIB_TARGET_X86_MCA_X86CUSTOMBEHAVIOUR_H
19 
20 #include "llvm/ADT/SmallVector.h"
23 
24 namespace llvm {
25 namespace mca {
26 
28  void processWaitCnt(std::unique_ptr<Instruction> &Inst, const MCInst &MCI);
29 
30  /// Called within X86InstrPostProcess to specify certain instructions
31  /// as load and store barriers.
32  void setMemBarriers(std::unique_ptr<Instruction> &Inst, const MCInst &MCI);
33 
34 public:
37 
38  ~X86InstrPostProcess() = default;
39 
40  void postProcessInstruction(std::unique_ptr<Instruction> &Inst,
41  const MCInst &MCI) override;
42 };
43 
44 } // namespace mca
45 } // namespace llvm
46 
47 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::mca::X86InstrPostProcess
Definition: X86CustomBehaviour.h:27
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
TargetParser.h
llvm::mca::X86InstrPostProcess::X86InstrPostProcess
X86InstrPostProcess(const MCSubtargetInfo &STI, const MCInstrInfo &MCII)
Definition: X86CustomBehaviour.h:35
llvm::mca::X86InstrPostProcess::~X86InstrPostProcess
~X86InstrPostProcess()=default
llvm::mca::InstrPostProcess::STI
const MCSubtargetInfo & STI
Definition: CustomBehaviour.h:37
CustomBehaviour.h
llvm::mca::InstrPostProcess::MCII
const MCInstrInfo & MCII
Definition: CustomBehaviour.h:38
llvm::mca::InstrPostProcess
Class which can be overriden by targets to modify the mca::Instruction objects before the pipeline st...
Definition: CustomBehaviour.h:35
llvm::MCInstrInfo
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:26
SmallVector.h
llvm::mca::X86InstrPostProcess::postProcessInstruction
void postProcessInstruction(std::unique_ptr< Instruction > &Inst, const MCInst &MCI) override
This method can be overriden by targets to modify the mca::Instruction object after it has been lower...
Definition: X86CustomBehaviour.cpp:39
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:76