LLVM 22.0.0git
InstrProfiling.h
Go to the documentation of this file.
1//===- Transforms/Instrumentation/InstrProfiling.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/// \file
9/// This file provides the interface for LLVM's PGO Instrumentation lowering
10/// pass.
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H
14#define LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H
15
16#include "llvm/IR/PassManager.h"
19
20namespace llvm {
21
22class TargetLibraryInfo;
23/// Instrumentation based profiling lowering pass. This pass lowers
24/// the profile instrumented code generated by FE or the IR based
25/// instrumentation pass.
27 : public PassInfoMixin<InstrProfilingLoweringPass> {
28 const InstrProfOptions Options = {};
29 // Is this lowering for the context-sensitive instrumentation.
30 const bool IsCS = false;
31
32public:
34 InstrProfilingLoweringPass(const InstrProfOptions &Options, bool IsCS = false)
35 : Options(Options), IsCS(IsCS) {}
36
38};
39} // end namespace llvm
40
41#endif // LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H
#define LLVM_ABI
Definition: Compiler.h:213
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:255
Instrumentation based profiling lowering pass.
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
InstrProfilingLoweringPass(const InstrProfOptions &Options, bool IsCS=false)
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
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Options for the frontend instrumentation based profiling pass.
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:70