|
LLVM 24.0.0git
|
#include "llvm/CodeGen/PHIElimination.h"#include "CodeGenOptions.h"#include "PHIEliminationUtils.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/CodeGen/LiveInterval.h"#include "llvm/CodeGen/LiveIntervals.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"#include "llvm/CodeGen/MachineDomTreeUpdater.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/MachinePostDominators.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/RegisterClassInfo.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/InitializePasses.h"#include "llvm/Pass.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 void | moveDebugInstructionsAfter (MachineBasicBlock &MBB, MachineBasicBlock::iterator Position) |
Move debug instructions preceding Position to immediately after it. | |
| static bool | isImplicitlyDefined (Register VirtReg, const MachineRegisterInfo &MRI) |
| Return true if all defs of VirtReg are implicit-defs. | |
| 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. | |
Variables | |
| DEBUG_TYPE | |
| Eliminate PHI nodes for register | allocation |
| Eliminate PHI nodes for register | false |
| #define DEBUG_TYPE "phi-node-elimination" |
Definition at line 54 of file PHIElimination.cpp.
|
static |
Return true if all sources of the phi node are implicit_def's, or undef's.
Definition at line 344 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 | ) |
References DEBUG_TYPE, and INITIALIZE_PASS_DEPENDENCY.
|
static |
Return true if all defs of VirtReg are implicit-defs.
This includes registers with no defs.
Definition at line 335 of file PHIElimination.cpp.
References MRI.
Referenced by allPhiOperandsUndefined().
|
static |
Move debug instructions preceding Position to immediately after it.
Definition at line 283 of file PHIElimination.cpp.
References I, InsertPt, MBB, and llvm::skipDebugInstructionsForward().
| STATISTIC | ( | NumCriticalEdgesSplit | , |
| "Number of critical edges split" | ) |
| STATISTIC | ( | NumLowered | , |
| "Number of phis lowered" | ) |
| STATISTIC | ( | NumReused | , |
| "Number of reused lowered phis" | ) |
Definition at line 202 of file PHIElimination.cpp.
| DEBUG_TYPE |
Definition at line 201 of file PHIElimination.cpp.
Definition at line 202 of file PHIElimination.cpp.