LLVM  4.0.0
PGOInstrumentation.h
Go to the documentation of this file.
1 //===- Transforms/PGOInstrumentation.h - PGO gen/use passes ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 /// \file
10 /// This file provides the interface for IR based instrumentation passes (
11 /// (profile-gen, and profile-use).
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_TRANSFORMS_PGOINSTRUMENTATION_H
15 #define LLVM_TRANSFORMS_PGOINSTRUMENTATION_H
16 
17 #include "llvm/IR/PassManager.h"
19 
20 namespace llvm {
21 
22 /// The instrumentation (profile-instr-gen) pass for IR based PGO.
23 class PGOInstrumentationGen : public PassInfoMixin<PGOInstrumentationGen> {
24 public:
26 };
27 
28 /// The profile annotation (profile-instr-use) pass for IR based PGO.
29 class PGOInstrumentationUse : public PassInfoMixin<PGOInstrumentationUse> {
30 public:
32  PGOInstrumentationUse(std::string Filename = "");
33 
34 private:
35  std::string ProfileFileName;
36 };
37 
38 /// The indirect function call promotion pass.
39 class PGOIndirectCallPromotion : public PassInfoMixin<PGOIndirectCallPromotion> {
40 public:
41  PGOIndirectCallPromotion(bool IsInLTO = false) : InLTO(IsInLTO) {}
43 private:
44  bool InLTO;
45 };
46 
47 } // End llvm namespace
48 #endif
The profile annotation (profile-instr-use) pass for IR based PGO.
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:52
PGOIndirectCallPromotion(bool IsInLTO=false)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
PGOInstrumentationUse(std::string Filename="")
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:311
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:107
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
The instrumentation (profile-instr-gen) pass for IR based PGO.
The indirect function call promotion pass.
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.