xref: /aosp_15_r20/external/llvm/lib/CodeGen/PHIEliminationUtils.h (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker //=- PHIEliminationUtils.h - Helper functions for PHI elimination -*- C++ -*-=//
2*9880d681SAndroid Build Coastguard Worker //
3*9880d681SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker //
5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker //
8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker 
10*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H
11*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_CODEGEN_PHIELIMINATIONUTILS_H
12*9880d681SAndroid Build Coastguard Worker 
13*9880d681SAndroid Build Coastguard Worker #include "llvm/CodeGen/MachineBasicBlock.h"
14*9880d681SAndroid Build Coastguard Worker 
15*9880d681SAndroid Build Coastguard Worker namespace llvm {
16*9880d681SAndroid Build Coastguard Worker     /// findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from
17*9880d681SAndroid Build Coastguard Worker     /// SrcReg when following the CFG edge to SuccMBB. This needs to be after
18*9880d681SAndroid Build Coastguard Worker     /// any def of SrcReg, but before any subsequent point where control flow
19*9880d681SAndroid Build Coastguard Worker     /// might jump out of the basic block.
20*9880d681SAndroid Build Coastguard Worker     MachineBasicBlock::iterator
21*9880d681SAndroid Build Coastguard Worker     findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB,
22*9880d681SAndroid Build Coastguard Worker                            unsigned SrcReg);
23*9880d681SAndroid Build Coastguard Worker }
24*9880d681SAndroid Build Coastguard Worker 
25*9880d681SAndroid Build Coastguard Worker #endif
26