LLVM 19.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"
18
19namespace llvm {
20
21class TargetLibraryInfo;
22/// Instrumentation based profiling lowering pass. This pass lowers
23/// the profile instrumented code generated by FE or the IR based
24/// instrumentation pass.
26 : public PassInfoMixin<InstrProfilingLoweringPass> {
27 const InstrProfOptions Options = {};
28 // Is this lowering for the context-sensitive instrumentation.
29 const bool IsCS = false;
30
31public:
33 InstrProfilingLoweringPass(const InstrProfOptions &Options, bool IsCS = false)
34 : Options(Options), IsCS(IsCS) {}
35
37};
38} // end namespace llvm
39
40#endif // LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
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:321
Instrumentation based profiling lowering pass.
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:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:109
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:74