xref: /openbsd-src/gnu/llvm/llvm/lib/CodeGen/PHIEliminationUtils.h (revision 09467b48e8bc8b4905716062da846024139afbf2)
1*09467b48Spatrick //=- PHIEliminationUtils.h - Helper functions for PHI elimination -*- C++ -*-=//
2*09467b48Spatrick //
3*09467b48Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*09467b48Spatrick // See https://llvm.org/LICENSE.txt for license information.
5*09467b48Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*09467b48Spatrick //
7*09467b48Spatrick //===----------------------------------------------------------------------===//
8*09467b48Spatrick 
9*09467b48Spatrick #ifndef LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H
10*09467b48Spatrick #define LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H
11*09467b48Spatrick 
12*09467b48Spatrick #include "llvm/CodeGen/MachineBasicBlock.h"
13*09467b48Spatrick 
14*09467b48Spatrick namespace llvm {
15*09467b48Spatrick     /// findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from
16*09467b48Spatrick     /// SrcReg when following the CFG edge to SuccMBB. This needs to be after
17*09467b48Spatrick     /// any def of SrcReg, but before any subsequent point where control flow
18*09467b48Spatrick     /// might jump out of the basic block.
19*09467b48Spatrick     MachineBasicBlock::iterator
20*09467b48Spatrick     findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB,
21*09467b48Spatrick                            unsigned SrcReg);
22*09467b48Spatrick }
23*09467b48Spatrick 
24*09467b48Spatrick #endif
25