1101099Srwatson//=- PHIEliminationUtils.h - Helper functions for PHI elimination -*- C++ -*-=// 2101099Srwatson// 3101099Srwatson// The LLVM Compiler Infrastructure 4101099Srwatson// 5101099Srwatson// This file is distributed under the University of Illinois Open Source 6101099Srwatson// License. See LICENSE.TXT for details. 7101099Srwatson// 8106393Srwatson//===----------------------------------------------------------------------===// 9106393Srwatson 10106393Srwatson#ifndef LLVM_CODEGEN_PHIELIMINATIONUTILS_H 11106393Srwatson#define LLVM_CODEGEN_PHIELIMINATIONUTILS_H 12101099Srwatson 13101099Srwatson#include "llvm/CodeGen/MachineBasicBlock.h" 14101099Srwatson 15101099Srwatsonnamespace llvm { 16101099Srwatson /// findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from 17101099Srwatson /// SrcReg when following the CFG edge to SuccMBB. This needs to be after 18101099Srwatson /// any def of SrcReg, but before any subsequent point where control flow 19101099Srwatson /// might jump out of the basic block. 20101099Srwatson MachineBasicBlock::iterator 21101099Srwatson findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB, 22101099Srwatson unsigned SrcReg); 23101099Srwatson} 24101099Srwatson 25101099Srwatson#endif 26101099Srwatson