• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- Transforms/Instrumentation/CGProfile.h -------------------*- 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 LLVM's Call Graph Profile pass.
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_TRANSFORMS_CGPROFILE_H
14 #define LLVM_TRANSFORMS_CGPROFILE_H
15 
16 #include "llvm/ADT/MapVector.h"
17 #include "llvm/IR/PassManager.h"
18 
19 namespace llvm {
20 class CGProfilePass : public PassInfoMixin<CGProfilePass> {
21 public:
22   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
23 
24 private:
25   void addModuleFlags(
26       Module &M,
27       MapVector<std::pair<Function *, Function *>, uint64_t> &Counts) const;
28 };
29 } // end namespace llvm
30 
31 #endif // LLVM_TRANSFORMS_CGPROFILE_H
32