LLVM 22.0.0git
EntryStage.h
Go to the documentation of this file.
1//===---------------------- EntryStage.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 Entry stage of an instruction pipeline. Its sole
11/// purpose in life is to pick instructions in sequence and move them to the
12/// next pipeline stage.
13///
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_MCA_STAGES_ENTRYSTAGE_H
17#define LLVM_MCA_STAGES_ENTRYSTAGE_H
18
20#include "llvm/MCA/SourceMgr.h"
23
24namespace llvm {
25namespace mca {
26
27class LLVM_ABI EntryStage final : public Stage {
28 InstRef CurrentInstruction;
30 SourceMgr &SM;
31 unsigned NumRetired;
32
33 // Updates the program counter, and sets 'CurrentInstruction'.
34 Error getNextInstruction();
35
36 EntryStage(const EntryStage &Other) = delete;
37 EntryStage &operator=(const EntryStage &Other) = delete;
38
39public:
40 EntryStage(SourceMgr &SM) : SM(SM), NumRetired(0) {}
41
42 bool isAvailable(const InstRef &IR) const override;
43 bool hasWorkToComplete() const override;
44 Error execute(InstRef &IR) override;
45 Error cycleStart() override;
46 Error cycleResume() override;
47 Error cycleEnd() override;
48};
49
50} // namespace mca
51} // namespace llvm
52
53#endif // LLVM_MCA_STAGES_ENTRYSTAGE_H
#define LLVM_ABI
Definition Compiler.h:213
Legalize the Machine IR a function s Machine IR
Definition Legalizer.cpp:80
This file contains abstract class SourceMgr and the default implementation, CircularSourceMgr.
This file defines the SmallVector class.
This file defines a stage.
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
EntryStage(SourceMgr &SM)
Definition EntryStage.h:40
An InstRef contains both a SourceMgr index and Instruction pair.
This is an optimization pass for GlobalISel generic memory operations.
@ Other
Any other memory.
Definition ModRef.h:68
Abstracting the input code sequence (a sequence of MCInst) and assigning unique identifiers to every ...
Definition SourceMgr.h:29