LLVM 20.0.0git
MachineUniformityAnalysis.h
Go to the documentation of this file.
1//===- MachineUniformityAnalysis.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 Machine IR instance of the generic uniformity analysis
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CODEGEN_MACHINEUNIFORMITYANALYSIS_H
15#define LLVM_CODEGEN_MACHINEUNIFORMITYANALYSIS_H
16
21
22namespace llvm {
23
24extern template class GenericUniformityInfo<MachineSSAContext>;
26
27/// \brief Compute uniformity information for a Machine IR function.
28///
29/// If \p HasBranchDivergence is false, produces a dummy result which assumes
30/// everything is uniform.
32 MachineFunction &F, const MachineCycleInfo &cycleInfo,
33 const MachineDominatorTree &domTree, bool HasBranchDivergence);
34
35/// Legacy analysis pass which computes a \ref MachineUniformityInfo.
38
39public:
40 static char ID;
41
43
45 const MachineUniformityInfo &getUniformityInfo() const { return UI; }
46
47 bool runOnMachineFunction(MachineFunction &F) override;
48 void getAnalysisUsage(AnalysisUsage &AU) const override;
49 void print(raw_ostream &OS, const Module *M = nullptr) const override;
50
51 // TODO: verify analysis
52};
53
54} // namespace llvm
55
56#endif // LLVM_CODEGEN_MACHINEUNIFORMITYANALYSIS_H
#define F(x, y, z)
Definition: MD5.cpp:55
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.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Legacy analysis pass which computes a MachineUniformityInfo.
const MachineUniformityInfo & getUniformityInfo() const
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
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr)
MachineUniformityInfo computeMachineUniformityInfo(MachineFunction &F, const MachineCycleInfo &cycleInfo, const MachineDominatorTree &domTree, bool HasBranchDivergence)
Compute uniformity information for a Machine IR function.