1 //===- RewriteStatepointsForGC.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 //
10 // This file provides interface to "Rewrite Statepoints for GC" pass.
11 //
12 // This passe rewrites call/invoke instructions so as to make potential
13 // relocations performed by the garbage collector explicit in the IR.
14 //
15 //===----------------------------------------------------------------------===//
16 
17 #ifndef LLVM_TRANSFORMS_SCALAR_REWRITE_STATEPOINTS_FOR_GC_H
18 #define LLVM_TRANSFORMS_SCALAR_REWRITE_STATEPOINTS_FOR_GC_H
19 
20 #include "llvm/IR/PassManager.h"
21 
22 namespace llvm {
23 
24 class DominatorTree;
25 class Function;
26 class Module;
27 class TargetTransformInfo;
28 class TargetLibraryInfo;
29 
30 struct RewriteStatepointsForGC : public PassInfoMixin<RewriteStatepointsForGC> {
31   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
32 
33   bool runOnFunction(Function &F, DominatorTree &, TargetTransformInfo &,
34                      const TargetLibraryInfo &);
35 };
36 
37 } // namespace llvm
38 
39 #endif // LLVM_TRANSFORMS_SCALAR_REWRITE_STATEPOINTS_FOR_GC_H
40