LLVM 22.0.0git
ProfileVerify.h
Go to the documentation of this file.
1//===- ProfileVerify.h - Verify profile info for testing ----------*-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// Inject profile information, as part of tests, to verify passes don't
10// accidentally drop it.
11//
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_TRANSFORMS_UTILS_PROFILEVERIFY_H
14#define LLVM_TRANSFORMS_UTILS_PROFILEVERIFY_H
15
16#include "llvm/IR/Analysis.h"
17#include "llvm/IR/PassManager.h"
19
20namespace llvm {
21/// Inject MD_prof metadata where it's missing. Used for testing that passes
22/// don't accidentally drop this metadata.
23class ProfileInjectorPass : public PassInfoMixin<ProfileInjectorPass> {
24public:
26};
27
28/// Checks that MD_prof is present on every instruction that supports it. Used
29/// in conjunction with the ProfileInjectorPass. MD_prof "unknown" is considered
30/// valid (i.e. !{!"unknown"})
31class ProfileVerifierPass : public PassInfoMixin<ProfileVerifierPass> {
32public:
34};
35
36} // namespace llvm
37#endif
#define LLVM_ABI
Definition Compiler.h:213
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition MD5.cpp:55
FunctionAnalysisManager FAM
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
Inject MD_prof metadata where it's missing.
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM)
Checks that MD_prof is present on every instruction that supports it.
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM)
Pass manager infrastructure for declaring and invalidating analyses.
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