LLVM 23.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
18#include "llvm/IR/PassManager.h"
19#include "llvm/IR/SSAContext.h"
20#include "llvm/Pass.h"
21
22namespace llvm {
23
24extern template class GenericUniformityInfo<SSAContext>;
26
27/// Analysis pass which computes \ref UniformityInfo.
31 static AnalysisKey Key;
32
33public:
34 /// Provide the result typedef for this analysis pass.
36
37 /// Run the analysis pass over a function and produce a dominator tree.
39
40 // TODO: verify analysis
41};
42
43/// Printer pass for the \c UniformityInfo.
53
54/// Legacy analysis pass which computes a \ref CycleInfo.
56 Function *Fn = nullptr;
58
59public:
60 static char ID;
61
63
65 const UniformityInfo &getUniformityInfo() const { return UI; }
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
static bool runOnFunction(Function &F, bool PostInlining)
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition MD5.cpp:54
This file declares a specialization of the GenericSSAContext<X> class template for LLVM IR.
Represent the analysis usage information of a pass.
FunctionPass(char &pid)
Definition Pass.h:316
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
Analysis pass which computes UniformityInfo.
UniformityInfo Result
Provide the result typedef for this analysis pass.
UniformityInfo run(Function &F, FunctionAnalysisManager &)
Run the analysis pass over a function and produce a dominator tree.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
const UniformityInfo & getUniformityInfo() const
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
GenericUniformityInfo< SSAContext > UniformityInfo
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition Analysis.h:29
A CRTP mix-in for passes that should not be skipped.