LLVM 24.0.0git
PGOCtxProfLowering.h
Go to the documentation of this file.
1//===-- PGOCtxProfLowering.h - Contextual PGO Instr. Lowering ---*- 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 declares the PGOCtxProfLoweringPass class.
10//
11//===----------------------------------------------------------------------===//
12#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_PGOCTXPROFLOWERING_H
13#define LLVM_TRANSFORMS_INSTRUMENTATION_PGOCTXPROFLOWERING_H
14
15#include "llvm/IR/PassManager.h"
16namespace llvm {
17class Type;
18namespace cl {
20} // namespace cl
21
23 : public OptionalPassInfoMixin<PGOCtxProfLoweringPass> {
24public:
25 explicit PGOCtxProfLoweringPass() = default;
26 // True if contextual instrumentation is enabled.
27 LLVM_ABI static bool
29
31};
32
33// Utility pass blocking inlining for any function that may be overridden during
34// linking by a prevailing copy.
35// This avoids confusingly collecting profiles for the same GUID corresponding
36// to different variants of the function. We could do like PGO and identify
37// functions by a (GUID, Hash) tuple, but since the ctxprof "use" waits for
38// thinlto to happen before performing any further optimizations, it's
39// unnecessary to collect profiles for non-prevailing copies.
41 : public OptionalPassInfoMixin<NoinlineNonPrevailing> {
42public:
43 explicit NoinlineNonPrevailing() = default;
44
46};
47
48} // namespace llvm
49#endif
#define LLVM_ABI
Definition Compiler.h:215
This header defines various interfaces for pass management in LLVM.
ModuleAnalysisManager MAM
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
static LLVM_ABI bool isCtxIRPGOInstrEnabled(const cl::LibraryOptionsContext *LibraryOptions)
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:46
This namespace contains all of the command line option processing machinery.
Definition CodeGenData.h:33
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A CRTP mix-in for passes that can be skipped.