1 //===- RewriteStatepointsForGC.h - ------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file provides interface to "Rewrite Statepoints for GC" pass.
11 // This passe rewrites call/invoke instructions so as to make potential
12 // relocations performed by the garbage collector explicit in the IR.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TRANSFORMS_SCALAR_REWRITE_STATEPOINTS_FOR_GC_H
17 #define LLVM_TRANSFORMS_SCALAR_REWRITE_STATEPOINTS_FOR_GC_H
19 #include "llvm/IR/PassManager.h"
26 class TargetTransformInfo
;
27 class TargetLibraryInfo
;
29 struct RewriteStatepointsForGC
: public PassInfoMixin
<RewriteStatepointsForGC
> {
30 PreservedAnalyses
run(Module
&M
, ModuleAnalysisManager
&AM
);
32 bool runOnFunction(Function
&F
, DominatorTree
&, TargetTransformInfo
&,
33 const TargetLibraryInfo
&);
38 #endif // LLVM_TRANSFORMS_SCALAR_REWRITE_STATEPOINTS_FOR_GC_H