blob: f6b5639e5aadce1d436931f4d241633617b6be07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
//===- Transforms/PGOInstrumentation.h - PGO gen/use passes ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
/// \file
/// This file provides the interface for IR based instrumentation passes (
/// (profile-gen, and profile-use).
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_PGOINSTRUMENTATION_H
#define LLVM_TRANSFORMS_PGOINSTRUMENTATION_H
#include "llvm/IR/PassManager.h"
#include "llvm/Transforms/Instrumentation.h"
namespace llvm {
/// The instrumentation (profile-instr-gen) pass for IR based PGO.
class PGOInstrumentationGen : public PassInfoMixin<PGOInstrumentationGen> {
public:
PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
};
/// The profile annotation (profile-instr-use) pass for IR based PGO.
class PGOInstrumentationUse : public PassInfoMixin<PGOInstrumentationUse> {
public:
PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
PGOInstrumentationUse(std::string Filename = "");
private:
std::string ProfileFileName;
};
/// The indirect function call promotion pass.
class PGOIndirectCallPromotion : public PassInfoMixin<PGOIndirectCallPromotion> {
public:
PGOIndirectCallPromotion(bool IsInLTO = false) : InLTO(IsInLTO) {}
PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
private:
bool InLTO;
};
} // End llvm namespace
#endif
|