| Michael Gottesman | f1d3b7c | 2013-08-12 20:52:06 +0000 | [diff] [blame] | 1 | //=- PHIEliminationUtils.h - Helper functions for PHI elimination -*- C++ -*-=// | 
| Cameron Zwarich | da592a9e | 2010-12-05 19:51:05 +0000 | [diff] [blame] | 2 | // | 
| Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 | 
| Cameron Zwarich | da592a9e | 2010-12-05 19:51:05 +0000 | [diff] [blame] | 6 | // | 
|  | 7 | //===----------------------------------------------------------------------===// | 
|  | 8 |  | 
| Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 9 | #ifndef LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H | 
|  | 10 | #define LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H | 
| Cameron Zwarich | da592a9e | 2010-12-05 19:51:05 +0000 | [diff] [blame] | 11 |  | 
|  | 12 | #include "llvm/CodeGen/MachineBasicBlock.h" | 
|  | 13 |  | 
|  | 14 | namespace llvm { | 
|  | 15 | /// findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from | 
|  | 16 | /// SrcReg when following the CFG edge to SuccMBB. This needs to be after | 
|  | 17 | /// any def of SrcReg, but before any subsequent point where control flow | 
|  | 18 | /// might jump out of the basic block. | 
|  | 19 | MachineBasicBlock::iterator | 
|  | 20 | findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB, | 
|  | 21 | unsigned SrcReg); | 
|  | 22 | } | 
|  | 23 |  | 
|  | 24 | #endif |