LLVM 17.0.0git
MachineCycleAnalysis.h
Go to the documentation of this file.
1//===- MachineCycleAnalysis.h - Cycle Info for Machine IR -------*- 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//
9// This file defines the MachineCycleInfo class, which is a thin wrapper over
10// the Machine IR instance of GenericCycleInfo.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CODEGEN_MACHINECYCLEANALYSIS_H
15#define LLVM_CODEGEN_MACHINECYCLEANALYSIS_H
16
20
21namespace llvm {
22
23extern template class GenericCycleInfo<MachineSSAContext>;
24extern template class GenericCycle<MachineSSAContext>;
25
28
29/// Legacy analysis pass which computes a \ref MachineCycleInfo.
31 MachineFunction *F = nullptr;
33
34public:
35 static char ID;
36
38
40 const MachineCycleInfo &getCycleInfo() const { return CI; }
41
42 bool runOnMachineFunction(MachineFunction &F) override;
43 void getAnalysisUsage(AnalysisUsage &AU) const override;
44 void releaseMemory() override;
45 void print(raw_ostream &OS, const Module *M = nullptr) const override;
46};
47
48// TODO: add this function to GenericCycle template after implementing IR
49// version.
50bool isCycleInvariant(const MachineCycle *Cycle, MachineInstr &I);
51
52} // end namespace llvm
53
54#endif // LLVM_CODEGEN_MACHINECYCLEANALYSIS_H
Find all cycles in a control-flow graph, including irreducible loops.
#define F(x, y, z)
Definition: MD5.cpp:55
#define I(x, y, z)
Definition: MD5.cpp:58
This file declares a specialization of the GenericSSAContext<X> template class for Machine IR.
raw_pwrite_stream & OS
Represent the analysis usage information of a pass.
GenericCycle< MachineSSAContext > CycleT
Legacy analysis pass which computes a MachineCycleInfo.
const MachineCycleInfo & getCycleInfo() const
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool isCycleInvariant(const MachineCycle *Cycle, MachineInstr &I)
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr)
MachineCycleInfo::CycleT MachineCycle
CycleInfo::CycleT Cycle
Definition: CycleAnalysis.h:28