1 //===-- ObjCARC.h - ObjCARC Scalar Transformations --------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This header file defines prototypes for accessor functions that expose passes
10 // in the ObjCARC Scalar Transformations library.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_TRANSFORMS_OBJCARC_H
15 #define LLVM_TRANSFORMS_OBJCARC_H
16 
17 #include "llvm/IR/PassManager.h"
18 
19 namespace llvm {
20 
21 class Pass;
22 
23 //===----------------------------------------------------------------------===//
24 //
25 // ObjCARCAPElim - ObjC ARC autorelease pool elimination.
26 //
27 Pass *createObjCARCAPElimPass();
28 
29 //===----------------------------------------------------------------------===//
30 //
31 // ObjCARCExpand - ObjC ARC preliminary simplifications.
32 //
33 Pass *createObjCARCExpandPass();
34 
35 //===----------------------------------------------------------------------===//
36 //
37 // ObjCARCContract - Late ObjC ARC cleanups.
38 //
39 Pass *createObjCARCContractPass();
40 
41 //===----------------------------------------------------------------------===//
42 //
43 // ObjCARCOpt - ObjC ARC optimization.
44 //
45 Pass *createObjCARCOptPass();
46 
47 struct ObjCARCOptPass : public PassInfoMixin<ObjCARCOptPass> {
48   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
49 };
50 
51 struct ObjCARCContractPass : public PassInfoMixin<ObjCARCContractPass> {
52   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
53 };
54 
55 struct ObjCARCAPElimPass : public PassInfoMixin<ObjCARCAPElimPass> {
56   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
57 };
58 
59 struct ObjCARCExpandPass : public PassInfoMixin<ObjCARCExpandPass> {
60   PreservedAnalyses run(Function &M, FunctionAnalysisManager &AM);
61 };
62 
63 } // End llvm namespace
64 
65 #endif
66