PHIEliminationUtils.h revision 261991
1219820Sjeff//=- PHIEliminationUtils.h - Helper functions for PHI elimination -*- C++ -*-=//
2219820Sjeff//
3219820Sjeff//                     The LLVM Compiler Infrastructure
4219820Sjeff//
5219820Sjeff// This file is distributed under the University of Illinois Open Source
6219820Sjeff// License. See LICENSE.TXT for details.
7219820Sjeff//
8219820Sjeff//===----------------------------------------------------------------------===//
9219820Sjeff
10219820Sjeff#ifndef LLVM_CODEGEN_PHIELIMINATIONUTILS_H
11219820Sjeff#define LLVM_CODEGEN_PHIELIMINATIONUTILS_H
12219820Sjeff
13219820Sjeff#include "llvm/CodeGen/MachineBasicBlock.h"
14219820Sjeff
15219820Sjeffnamespace llvm {
16219820Sjeff    /// findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from
17219820Sjeff    /// SrcReg when following the CFG edge to SuccMBB. This needs to be after
18219820Sjeff    /// any def of SrcReg, but before any subsequent point where control flow
19219820Sjeff    /// might jump out of the basic block.
20219820Sjeff    MachineBasicBlock::iterator
21219820Sjeff    findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB,
22219820Sjeff                           unsigned SrcReg);
23219820Sjeff}
24219820Sjeff
25219820Sjeff#endif
26219820Sjeff