]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/llvm/include/llvm/Transforms/Utils/GuardUtils.h
MFV r358616:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / llvm / include / llvm / Transforms / Utils / GuardUtils.h
1 //===-- GuardUtils.h - Utils for work with guards ---------------*- 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 // Utils that are used to perform transformations related to guards and their
9 // conditions.
10 //===----------------------------------------------------------------------===//
11
12 #ifndef LLVM_TRANSFORMS_UTILS_GUARDUTILS_H
13 #define LLVM_TRANSFORMS_UTILS_GUARDUTILS_H
14
15 namespace llvm {
16
17 class CallInst;
18 class Function;
19
20 /// Splits control flow at point of \p Guard, replacing it with explicit branch
21 /// by the condition of guard's first argument. The taken branch then goes to
22 /// the block that contains  \p Guard's successors, and the non-taken branch
23 /// goes to a newly-created deopt block that contains a sole call of the
24 /// deoptimize function \p DeoptIntrinsic.
25 void makeGuardControlFlowExplicit(Function *DeoptIntrinsic, CallInst *Guard);
26
27 } // llvm
28
29 #endif // LLVM_TRANSFORMS_UTILS_GUARDUTILS_H