Go to the source code of this file.
|
| | STATISTIC (NumReuse,"Number of extension results reused") |
| |
| | STATISTIC (NumCmps,"Number of compares eliminated") |
| |
| | STATISTIC (NumImmFold,"Number of move immediate folded") |
| |
| | STATISTIC (NumLoadFold,"Number of loads folded") |
| |
| | STATISTIC (NumSelects,"Number of selects optimized") |
| |
| | STATISTIC (NumUncoalescableCopies,"Number of uncoalescable copies optimized") |
| |
| | STATISTIC (NumRewrittenCopies,"Number of copies rewritten") |
| |
| | STATISTIC (NumNAPhysCopies,"Number of non-allocatable physical copies removed") |
| |
| | INITIALIZE_PASS_BEGIN (PeepholeOptimizer, DEBUG_TYPE,"Peephole Optimizations", false, false) INITIALIZE_PASS_END(PeepholeOptimizer |
| |
| static MachineInstr * | insertPHI (MachineRegisterInfo *MRI, const TargetInstrInfo *TII, const SmallVectorImpl< TargetInstrInfo::RegSubRegPair > &SrcRegs, MachineInstr *OrigPHI) |
| | Insert a PHI instruction with incoming edges SrcRegs that are guaranteed to have the same register class. More...
|
| |
| static CopyRewriter * | getCopyRewriter (MachineInstr &MI, const TargetInstrInfo &TII, MachineRegisterInfo &MRI) |
| | Get the appropriated CopyRewriter for MI. More...
|
| |
|
| static cl::opt< bool > | Aggressive ("aggressive-ext-opt", cl::Hidden, cl::desc("Aggressive extension optimization")) |
| |
| static cl::opt< bool > | DisablePeephole ("disable-peephole", cl::Hidden, cl::init(false), cl::desc("Disable the peephole optimizer")) |
| |
| static cl::opt< bool > | DisableAdvCopyOpt ("disable-adv-copy-opt", cl::Hidden, cl::init(false), cl::desc("Disable advanced copy optimization")) |
| |
| static cl::opt< bool > | DisableNAPhysCopyOpt ("disable-non-allocatable-phys-copy-opt", cl::Hidden, cl::init(false), cl::desc("Disable non-allocatable physical register copy optimization")) |
| |
| static cl::opt< unsigned > | RewritePHILimit ("rewrite-phi-limit", cl::Hidden, cl::init(10), cl::desc("Limit the length of PHI chains to lookup")) |
| |
| | DEBUG_TYPE |
| |
| Peephole | Optimizations |
| |
| Peephole | false |
| |
| #define DEBUG_TYPE "peephole-opt" |
Insert a PHI instruction with incoming edges SrcRegs that are guaranteed to have the same register class.
This is necessary whenever we successfully traverse a PHI instruction and find suitable sources coming from its edges. By inserting a new PHI, we provide a rewritten PHI def suitable to be used in a new COPY instruction.
Definition at line 729 of file PeepholeOptimizer.cpp.
References llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::clearKillFlags(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SmallVectorBase::empty(), llvm::MCInstrInfo::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), and llvm::MachineRegisterInfo::getRegClass().
| STATISTIC |
( |
NumReuse |
, |
|
|
"Number of extension results reused" |
|
|
) |
| |
| STATISTIC |
( |
NumCmps |
, |
|
|
"Number of compares eliminated" |
|
|
) |
| |
| STATISTIC |
( |
NumImmFold |
, |
|
|
"Number of move immediate folded" |
|
|
) |
| |
| STATISTIC |
( |
NumLoadFold |
, |
|
|
"Number of loads folded" |
|
|
) |
| |
| STATISTIC |
( |
NumSelects |
, |
|
|
"Number of selects optimized" |
|
|
) |
| |
| STATISTIC |
( |
NumUncoalescableCopies |
, |
|
|
"Number of uncoalescable copies optimized" |
|
|
) |
| |
| STATISTIC |
( |
NumRewrittenCopies |
, |
|
|
"Number of copies rewritten" |
|
|
) |
| |
| STATISTIC |
( |
NumNAPhysCopies |
, |
|
|
"Number of non-allocatable physical copies removed" |
|
|
) |
| |
| cl::opt<bool> DisablePeephole("disable-peephole", cl::Hidden, cl::init(false), cl::desc("Disable the peephole optimizer")) |
|
static |