summaryrefslogtreecommitdiff
path: root/clang-r353983/include/llvm/Transforms/Instrumentation/CGProfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-r353983/include/llvm/Transforms/Instrumentation/CGProfile.h')
-rw-r--r--clang-r353983/include/llvm/Transforms/Instrumentation/CGProfile.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/clang-r353983/include/llvm/Transforms/Instrumentation/CGProfile.h b/clang-r353983/include/llvm/Transforms/Instrumentation/CGProfile.h
new file mode 100644
index 00000000..28fd3804
--- /dev/null
+++ b/clang-r353983/include/llvm/Transforms/Instrumentation/CGProfile.h
@@ -0,0 +1,30 @@
+//===- Transforms/Instrumentation/CGProfile.h -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+/// \file
+/// This file provides the interface for LLVM's Call Graph Profile pass.
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TRANSFORMS_CGPROFILE_H
+#define LLVM_TRANSFORMS_CGPROFILE_H
+
+#include "llvm/ADT/MapVector.h"
+#include "llvm/IR/PassManager.h"
+
+namespace llvm {
+class CGProfilePass : public PassInfoMixin<CGProfilePass> {
+public:
+ PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
+
+private:
+ void addModuleFlags(
+ Module &M,
+ MapVector<std::pair<Function *, Function *>, uint64_t> &Counts) const;
+};
+} // end namespace llvm
+
+#endif // LLVM_TRANSFORMS_CGPROFILE_H