Enzyme main
Loading...
Searching...
No Matches
TypeAnalysisPrinter.h
Go to the documentation of this file.
1//===- TypeAnalysisPrinter.h - Printer utility pass for Type 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 Type Analysis
22// results of a given function.
23//
24//===----------------------------------------------------------------------===//
25
26#ifndef ENZYME_TYPE_ANALYSIS_TYPE_ANALYSIS_PRINTER_H
27#define ENZYME_TYPE_ANALYSIS_TYPE_ANALYSIS_PRINTER_H
28
29#include "../PassUtils.h"
30#include "llvm/IR/PassManager.h"
31
32namespace llvm {
33class FunctionPass;
34}
35
37 : public PassParent<TypeAnalysisPrinterNewPM> {
39
40private:
41 static llvm::AnalysisKey Key;
42
43public:
44 using Result = llvm::PreservedAnalyses;
46
47 Result run(llvm::Module &M, llvm::ModuleAnalysisManager &MAM);
48
49 static bool isRequired() { return true; }
50};
51
52#endif // ENZYME_TYPE_ANALYSIS_TYPE_ANALYSIS_PRINTER_H
llvm::PreservedAnalyses Result
Result run(llvm::Module &M, llvm::ModuleAnalysisManager &MAM)