Enzyme main
Loading...
Searching...
No Matches
JLInstSimplify.h
Go to the documentation of this file.
1//=- JLInstSimplify.h - Additional instsimplifyrules for julia programs =//
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#ifndef ENZYME_JL_INST_SIMPLIFY_H
22#define ENZYME_JL_INST_SIMPLIFY_H
23
24#include <llvm/Config/llvm-config.h>
25
26#include "PassUtils.h"
27#include "llvm/IR/PassManager.h"
28
29namespace llvm {
30class FunctionPass;
31}
32
33class JLInstSimplifyNewPM final : public PassParent<JLInstSimplifyNewPM> {
35
36private:
37 static llvm::AnalysisKey Key;
38
39public:
40 using Result = llvm::PreservedAnalyses;
42
43 Result run(llvm::Function &M, llvm::FunctionAnalysisManager &MAM);
44
45 static bool isRequired() { return true; }
46};
47
48#endif // ENZYME_JL_INST_SIMPLIFY_H
Result run(llvm::Function &M, llvm::FunctionAnalysisManager &MAM)
static bool isRequired()
llvm::PreservedAnalyses Result