Enzyme main
Loading...
Searching...
No Matches
ActivityAnalysisPrinter.h
Go to the documentation of this file.
1//=- ActivityAnalysisPrinter.h - Printer utility pass for Activity Analysis =//
2//
3// Enzyme Project
4//
5// Part of the Enzyme Project, under the Apache License v2.0 with LLVM
6// Exceptions. See https://llvm.org/LICENSE.txt for license information.
7// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8//
9// If using this code in an academic setting, please cite the following:
10// @incollection{enzymeNeurips,
11// title = {Instead of Rewriting Foreign Code for Machine Learning,
12// Automatically Synthesize Fast Gradients},
13// author = {Moses, William S. and Churavy, Valentin},
14// booktitle = {Advances in Neural Information Processing Systems 33},
15// year = {2020},
16// note = {To appear in},
17// }
18//
19//===----------------------------------------------------------------------===//
20//
21// This file contains a utility LLVM pass for printing derived Activity Analysis
22// results of a given function.
23//
24//===----------------------------------------------------------------------===//
25
26#ifndef ENZYME_ACTIVITY_ANALYSIS_PRINTER_H
27#define ENZYME_ACTIVITY_ANALYSIS_PRINTER_H
28
29#include <llvm/Config/llvm-config.h>
30
31#include "PassUtils.h"
32#include "llvm/IR/PassManager.h"
33
34namespace llvm {
35class FunctionPass;
36}
37
39 : public PassParent<ActivityAnalysisPrinterNewPM> {
41
42private:
43 static llvm::AnalysisKey Key;
44
45public:
46 using Result = llvm::PreservedAnalyses;
48
49 Result run(llvm::Module &M, llvm::ModuleAnalysisManager &MAM);
50
51 static bool isRequired() { return true; }
52};
53
54#endif // ENZYME_ACTIVITY_ANALYSIS_PRINTER_H
Result run(llvm::Module &M, llvm::ModuleAnalysisManager &MAM)