File indexing completed on 2026-05-10 08:44:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef LLVM_TRANSFORMS_IPO_SAMPLEPROFILE_H
0015 #define LLVM_TRANSFORMS_IPO_SAMPLEPROFILE_H
0016
0017 #include "llvm/ADT/IntrusiveRefCntPtr.h"
0018 #include "llvm/IR/PassManager.h"
0019 #include "llvm/Pass.h"
0020 #include "llvm/Support/CommandLine.h"
0021 #include <string>
0022
0023 namespace llvm {
0024
0025 class Module;
0026
0027 extern cl::opt<int> SampleHotCallSiteThreshold;
0028 extern cl::opt<int> SampleColdCallSiteThreshold;
0029 extern cl::opt<int> ProfileInlineGrowthLimit;
0030 extern cl::opt<int> ProfileInlineLimitMin;
0031 extern cl::opt<int> ProfileInlineLimitMax;
0032 extern cl::opt<bool> SortProfiledSCC;
0033
0034 namespace vfs {
0035 class FileSystem;
0036 }
0037
0038
0039 class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> {
0040 public:
0041 SampleProfileLoaderPass(
0042 std::string File = "", std::string RemappingFile = "",
0043 ThinOrFullLTOPhase LTOPhase = ThinOrFullLTOPhase::None,
0044 IntrusiveRefCntPtr<vfs::FileSystem> FS = nullptr,
0045 bool DisableSampleProfileInlining = false,
0046 bool UseFlattenedProfile = false);
0047
0048 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
0049
0050 private:
0051 std::string ProfileFileName;
0052 std::string ProfileRemappingFileName;
0053 const ThinOrFullLTOPhase LTOPhase;
0054 IntrusiveRefCntPtr<vfs::FileSystem> FS;
0055 bool DisableSampleProfileInlining;
0056 bool UseFlattenedProfile;
0057 };
0058
0059 }
0060
0061 #endif