LLVM
15.0.0git
|
#include "PHIEliminationUtils.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/CodeGen/LiveInterval.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/LiveVariables.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SlotIndexes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <iterator>
#include <utility>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "phi-node-elimination" |
Functions | |
STATISTIC (NumLowered, "Number of phis lowered") | |
STATISTIC (NumCriticalEdgesSplit, "Number of critical edges split") | |
STATISTIC (NumReused, "Number of reused lowered phis") | |
INITIALIZE_PASS_BEGIN (PHIElimination, DEBUG_TYPE, "Eliminate PHI nodes for register allocation", false, false) INITIALIZE_PASS_END(PHIElimination | |
static bool | isImplicitlyDefined (unsigned VirtReg, const MachineRegisterInfo &MRI) |
Return true if all defs of VirtReg are implicit-defs. More... | |
static bool | allPhiOperandsUndefined (const MachineInstr &MPhi, const MachineRegisterInfo &MRI) |
Return true if all sources of the phi node are implicit_def's, or undef's. More... | |
Variables | |
static cl::opt< bool > | DisableEdgeSplitting ("disable-phi-elim-edge-splitting", cl::init(false), cl::Hidden, cl::desc("Disable critical edge splitting " "during PHI elimination")) |
static cl::opt< bool > | SplitAllCriticalEdges ("phi-elim-split-all-critical-edges", cl::init(false), cl::Hidden, cl::desc("Split all critical edges during " "PHI elimination")) |
static cl::opt< bool > | NoPhiElimLiveOutEarlyExit ("no-phi-elim-live-out-early-exit", cl::init(false), cl::Hidden, cl::desc("Do not use an early exit if isLiveOutPastPHIs returns true.")) |
DEBUG_TYPE | |
Eliminate PHI nodes for register | allocation |
Eliminate PHI nodes for register | false |
#define DEBUG_TYPE "phi-node-elimination" |
Definition at line 47 of file PHIElimination.cpp.
|
static |
Return true if all sources of the phi node are implicit_def's, or undef's.
Definition at line 259 of file PHIElimination.cpp.
References E, llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), I, isImplicitlyDefined(), llvm::MachineOperand::isUndef(), and MRI.
INITIALIZE_PASS_BEGIN | ( | PHIElimination | , |
DEBUG_TYPE | , | ||
"Eliminate PHI nodes for register allocation" | , | ||
false | , | ||
false | |||
) |
|
static |
Return true if all defs of VirtReg are implicit-defs.
This includes registers with no defs.
Definition at line 250 of file PHIElimination.cpp.
References llvm::MachineRegisterInfo::def_instructions(), and MRI.
Referenced by allPhiOperandsUndefined().
Definition at line 135 of file PHIElimination.cpp.
DEBUG_TYPE |
Definition at line 134 of file PHIElimination.cpp.
|
static |
Definition at line 135 of file PHIElimination.cpp.
|
static |
|
static |