LLVM 22.0.0git
KernelInfo.h
Go to the documentation of this file.
1//=- KernelInfo.h - Kernel Analysis -------------------------------*- 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 KernelInfoPrinter class used to emit remarks about
10// function properties from a GPU kernel.
11//
12// See llvm/docs/KernelInfo.rst.
13// ===---------------------------------------------------------------------===//
14
15#ifndef LLVM_ANALYSIS_KERNELINFO_H
16#define LLVM_ANALYSIS_KERNELINFO_H
17
18#include "llvm/IR/PassManager.h"
19
20namespace llvm {
21
22class TargetMachine;
23
24class KernelInfoPrinter : public PassInfoMixin<KernelInfoPrinter> {
25 TargetMachine *TM;
26
27public:
28 explicit KernelInfoPrinter(TargetMachine *TM) : TM(TM) {}
29
31
32 static bool isRequired() { return true; }
33};
34} // namespace llvm
35#endif // LLVM_ANALYSIS_KERNELINFO_H
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition MD5.cpp:55
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static bool isRequired()
Definition KernelInfo.h:32
KernelInfoPrinter(TargetMachine *TM)
Definition KernelInfo.h:28
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
Primary interface to the complete machine description for the target machine.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition PassManager.h:70