LLVM 20.0.0git
UniformityAnalysis.h
Go to the documentation of this file.
1//===- UniformityAnalysis.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//
9/// \file
10/// \brief LLVM IR instance of the generic uniformity analysis
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_ANALYSIS_UNIFORMITYANALYSIS_H
15#define LLVM_ANALYSIS_UNIFORMITYANALYSIS_H
16
19
20namespace llvm {
21
22extern template class GenericUniformityInfo<SSAContext>;
24
25/// Analysis pass which computes \ref UniformityInfo.
29 static AnalysisKey Key;
30
31public:
32 /// Provide the result typedef for this analysis pass.
34
35 /// Run the analysis pass over a function and produce a dominator tree.
37
38 // TODO: verify analysis
39};
40
41/// Printer pass for the \c UniformityInfo.
45
46public:
48
50
51 static bool isRequired() { return true; }
52};
53
54/// Legacy analysis pass which computes a \ref CycleInfo.
56 Function *m_function = nullptr;
57 UniformityInfo m_uniformityInfo;
58
59public:
60 static char ID;
61
63
64 UniformityInfo &getUniformityInfo() { return m_uniformityInfo; }
65 const UniformityInfo &getUniformityInfo() const { return m_uniformityInfo; }
66
67 bool runOnFunction(Function &F) override;
68 void getAnalysisUsage(AnalysisUsage &AU) const override;
69 void releaseMemory() override;
70 void print(raw_ostream &OS, const Module *M = nullptr) const override;
71
72 // TODO: verify analysis
73};
74
75} // namespace llvm
76
77#endif // LLVM_ANALYSIS_UNIFORMITYANALYSIS_H
This file declares an analysis pass that computes CycleInfo for LLVM IR, specialized from GenericCycl...
static bool runOnFunction(Function &F, bool PostInlining)
#define F(x, y, z)
Definition: MD5.cpp:55
raw_pwrite_stream & OS
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:310
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
Analysis pass which computes UniformityInfo.
Printer pass for the UniformityInfo.
Legacy analysis pass which computes a CycleInfo.
const UniformityInfo & getUniformityInfo() const
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
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr)
GenericUniformityInfo< SSAContext > UniformityInfo
A CRTP mix-in that provides informational APIs needed for analysis passes.
Definition: PassManager.h:92
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition: Analysis.h:28
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69