LLVM  14.0.0git
CustomBehaviour.cpp
Go to the documentation of this file.
1 //===--------------------- CustomBehaviour.cpp ------------------*- 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 implements methods from the CustomBehaviour interface.
11 ///
12 //===----------------------------------------------------------------------===//
13 
15 
16 namespace llvm {
17 namespace mca {
18 
20 
22  const InstRef &IR) {
23  // 0 signifies that there are no hazards that need to be waited on
24  return 0;
25 }
26 
27 std::vector<std::unique_ptr<View>>
30  return std::vector<std::unique_ptr<View>>();
31 }
32 
33 std::vector<std::unique_ptr<View>>
36  return std::vector<std::unique_ptr<View>>();
37 }
38 
39 std::vector<std::unique_ptr<View>>
42  return std::vector<std::unique_ptr<View>>();
43 }
44 
45 } // namespace mca
46 } // namespace llvm
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::mca::CustomBehaviour::~CustomBehaviour
virtual ~CustomBehaviour()
Definition: CustomBehaviour.cpp:19
IP
Definition: NVPTXLowerArgs.cpp:166
IR
Statically lint checks LLVM IR
Definition: Lint.cpp:746
CustomBehaviour.h
llvm::MCInstPrinter
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:43
llvm::mca::InstRef
An InstRef contains both a SourceMgr index and Instruction pair.
Definition: Instruction.h:686
llvm::mca::CustomBehaviour::getStartViews
virtual std::vector< std::unique_ptr< View > > getStartViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
Return a vector of Views that will be added before all other Views.
Definition: CustomBehaviour.cpp:28
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::mca::CustomBehaviour::checkCustomHazard
virtual unsigned checkCustomHazard(ArrayRef< InstRef > IssuedInst, const InstRef &IR)
Before the llvm-mca pipeline dispatches an instruction, it first checks for any register or resource ...
Definition: CustomBehaviour.cpp:21
llvm::mca::CustomBehaviour::getEndViews
virtual std::vector< std::unique_ptr< View > > getEndViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
Return a vector of Views that will be added after all other Views.
Definition: CustomBehaviour.cpp:40
llvm::mca::CustomBehaviour::getPostInstrInfoViews
virtual std::vector< std::unique_ptr< View > > getPostInstrInfoViews(llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
Return a vector of Views that will be added after the InstructionInfoView.
Definition: CustomBehaviour.cpp:34