1 //===- Transforms/PGOInstrumentation.h - PGO gen/use passes ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 /// This file provides the interface for IR based instrumentation passes (
11 /// (profile-gen, and profile-use).
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_PGOINSTRUMENTATION_H
15 #define LLVM_TRANSFORMS_PGOINSTRUMENTATION_H
17 #include "llvm/IR/PassManager.h"
18 #include "llvm/Transforms/Instrumentation.h"
22 /// The instrumentation (profile-instr-gen) pass for IR based PGO.
23 class PGOInstrumentationGen : public PassInfoMixin<PGOInstrumentationGen> {
25 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
28 /// The profile annotation (profile-instr-use) pass for IR based PGO.
29 class PGOInstrumentationUse : public PassInfoMixin<PGOInstrumentationUse> {
31 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
32 PGOInstrumentationUse(std::string Filename = "");
35 std::string ProfileFileName;
38 /// The indirect function call promotion pass.
39 class PGOIndirectCallPromotion : public PassInfoMixin<PGOIndirectCallPromotion> {
41 PGOIndirectCallPromotion(bool IsInLTO = false) : InLTO(IsInLTO) {}
42 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
47 } // End llvm namespace