LLVM 20.0.0git
SampleProfile.h
Go to the documentation of this file.
1//===- SampleProfile.h - SamplePGO pass ---------- --------------*- 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/// \file
10/// This file provides the interface for the sampled PGO loader pass.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_TRANSFORMS_IPO_SAMPLEPROFILE_H
15#define LLVM_TRANSFORMS_IPO_SAMPLEPROFILE_H
16
18#include "llvm/IR/PassManager.h"
19#include "llvm/Pass.h"
21#include <string>
22
23namespace llvm {
24
25class Module;
26
27extern cl::opt<int> SampleHotCallSiteThreshold;
28extern cl::opt<int> SampleColdCallSiteThreshold;
29extern cl::opt<int> ProfileInlineGrowthLimit;
30extern cl::opt<int> ProfileInlineLimitMin;
31extern cl::opt<int> ProfileInlineLimitMax;
32extern cl::opt<bool> SortProfiledSCC;
33
34namespace vfs {
35class FileSystem;
36} // namespace vfs
37
38/// The sample profiler data loader pass.
39class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> {
40public:
42 std::string File = "", std::string RemappingFile = "",
45
47
48private:
49 std::string ProfileFileName;
50 std::string ProfileRemappingFileName;
51 const ThinOrFullLTOPhase LTOPhase;
53};
54
55} // end namespace llvm
56
57#endif // LLVM_TRANSFORMS_IPO_SAMPLEPROFILE_H
This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.
Machine Check Debug Module
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:253
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
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:111
The sample profiler data loader pass.
Definition: SampleProfile.h:39
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
cl::opt< int > ProfileInlineLimitMin
ThinOrFullLTOPhase
This enumerates the LLVM full LTO or ThinLTO optimization phases.
Definition: Pass.h:76
@ None
No LTO/ThinLTO behavior needed.
cl::opt< int > SampleHotCallSiteThreshold
cl::opt< int > SampleColdCallSiteThreshold
cl::opt< bool > SortProfiledSCC
cl::opt< int > ProfileInlineLimitMax
cl::opt< int > ProfileInlineGrowthLimit
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69