1261991Sdim//=- PHIEliminationUtils.h - Helper functions for PHI elimination -*- C++ -*-=//
2218885Sdim//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6218885Sdim//
7218885Sdim//===----------------------------------------------------------------------===//
8218885Sdim
9280031Sdim#ifndef LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H
10280031Sdim#define LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H
11218885Sdim
12218885Sdim#include "llvm/CodeGen/MachineBasicBlock.h"
13218885Sdim
14218885Sdimnamespace llvm {
15218885Sdim    /// findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from
16218885Sdim    /// SrcReg when following the CFG edge to SuccMBB. This needs to be after
17218885Sdim    /// any def of SrcReg, but before any subsequent point where control flow
18218885Sdim    /// might jump out of the basic block.
19218885Sdim    MachineBasicBlock::iterator
20218885Sdim    findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB,
21218885Sdim                           unsigned SrcReg);
22218885Sdim}
23218885Sdim
24218885Sdim#endif
25