LLVM 22.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"
22#include <string>
23
24namespace llvm {
25
26class Module;
27
34
35namespace vfs {
36class FileSystem;
37} // namespace vfs
38
39/// The sample profiler data loader pass.
40class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> {
41public:
43 std::string File = "", std::string RemappingFile = "",
46 bool DisableSampleProfileInlining = false,
47 bool UseFlattenedProfile = false);
48
50
51private:
52 std::string ProfileFileName;
53 std::string ProfileRemappingFileName;
54 const ThinOrFullLTOPhase LTOPhase;
56 bool DisableSampleProfileInlining;
57 bool UseFlattenedProfile;
58};
59
60} // end namespace llvm
61
62#endif // LLVM_TRANSFORMS_IPO_SAMPLEPROFILE_H
#define LLVM_ABI
Definition Compiler.h:213
This header defines various interfaces for pass management in LLVM.
This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.
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:67
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
LLVM_ABI SampleProfileLoaderPass(std::string File="", std::string RemappingFile="", ThinOrFullLTOPhase LTOPhase=ThinOrFullLTOPhase::None, IntrusiveRefCntPtr< vfs::FileSystem > FS=nullptr, bool DisableSampleProfileInlining=false, bool UseFlattenedProfile=false)
The virtual file system interface.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI cl::opt< int > ProfileInlineLimitMin
ThinOrFullLTOPhase
This enumerates the LLVM full LTO or ThinLTO optimization phases.
Definition Pass.h:77
@ None
No LTO/ThinLTO behavior needed.
Definition Pass.h:79
LLVM_ABI cl::opt< int > SampleHotCallSiteThreshold
LLVM_ABI cl::opt< int > SampleColdCallSiteThreshold
LLVM_ABI cl::opt< bool > SortProfiledSCC
LLVM_ABI cl::opt< int > ProfileInlineLimitMax
LLVM_ABI cl::opt< int > ProfileInlineGrowthLimit
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition PassManager.h:70