LLVM API Documentation
#include <PPCInstrInfo.h>
Definition at line 67 of file PPCInstrInfo.h.
PPCInstrInfo::PPCInstrInfo | ( | PPCSubtarget & | STI | ) | [explicit] |
Definition at line 64 of file PPCInstrInfo.cpp.
bool PPCInstrInfo::AnalyzeBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock *& | TBB, | ||
MachineBasicBlock *& | FBB, | ||
SmallVectorImpl< MachineOperand > & | Cond, | ||
bool | AllowModify | ||
) | const [override] |
Definition at line 342 of file PPCInstrInfo.cpp.
References llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineBasicBlock::begin(), llvm::MachineOperand::CreateImm(), llvm::MachineOperand::CreateReg(), DisableCTRLoopAnal, llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), I, llvm::MachineOperand::isMBB(), llvm::PPCSubtarget::isPPC64(), isUnpredicatedTerminator(), llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
bool PPCInstrInfo::analyzeCompare | ( | const MachineInstr * | MI, |
unsigned & | SrcReg, | ||
unsigned & | SrcReg2, | ||
int & | Mask, | ||
int & | Value | ||
) | const [override] |
Definition at line 1286 of file PPCInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
bool PPCInstrInfo::canInsertSelect | ( | const MachineBasicBlock & | MBB, |
const SmallVectorImpl< MachineOperand > & | Cond, | ||
unsigned | TrueReg, | ||
unsigned | FalseReg, | ||
int & | CondCycles, | ||
int & | TrueCycles, | ||
int & | FalseCycles | ||
) | const [override] |
Definition at line 589 of file PPCInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::PPCSubtarget::hasISEL(), and llvm::SmallVectorTemplateCommon< T >::size().
MachineInstr * PPCInstrInfo::commuteInstruction | ( | MachineInstr * | MI, |
bool | NewMI | ||
) | const [override] |
Definition at line 228 of file PPCInstrInfo.cpp.
References llvm::BuildMI(), llvm::TargetInstrInfo::commuteInstruction(), llvm::RegState::Define, llvm::getDeadRegState(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::getKillRegState(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MCInstrDesc::getOperandConstraint(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isKill(), llvm::AArch64CC::MI, llvm::MachineOperand::setImm(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), llvm::MachineOperand::setSubReg(), and llvm::MCOI::TIED_TO.
void PPCInstrInfo::copyPhysReg | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | I, | ||
DebugLoc | DL, | ||
unsigned | DestReg, | ||
unsigned | SrcReg, | ||
bool | KillSrc | ||
) | const [override] |
Definition at line 694 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::getKillRegState(), llvm::TargetRegisterInfo::getMatchingSuperReg(), llvm::MCInstrDesc::getNumOperands(), getRegisterInfo(), llvm_unreachable, OR, and VSXSelfCopyCrash.
ScheduleHazardRecognizer * PPCInstrInfo::CreateTargetHazardRecognizer | ( | const TargetSubtargetInfo * | STI, |
const ScheduleDAG * | DAG | ||
) | const [override] |
CreateTargetHazardRecognizer - Return the hazard recognizer to use for this target when scheduling the DAG.
Definition at line 71 of file PPCInstrInfo.cpp.
References llvm::PPC::DIR_440, llvm::PPC::DIR_A2, llvm::PPC::DIR_E500mc, and llvm::PPC::DIR_E5500.
ScheduleHazardRecognizer * PPCInstrInfo::CreateTargetPostRAHazardRecognizer | ( | const InstrItineraryData * | II, |
const ScheduleDAG * | DAG | ||
) | const [override] |
CreateTargetPostRAHazardRecognizer - Return the postRA hazard recognizer to use for this target when scheduling the DAG.
Definition at line 87 of file PPCInstrInfo.cpp.
References llvm::PPC::DIR_440, llvm::PPC::DIR_A2, llvm::PPC::DIR_E500mc, llvm::PPC::DIR_E5500, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, llvm::TargetMachine::getSubtarget(), llvm::ScheduleDAG::TII, and llvm::ScheduleDAG::TM.
bool PPCInstrInfo::DefinesPredicate | ( | MachineInstr * | MI, |
std::vector< MachineOperand > & | Pred | ||
) | const [override] |
Definition at line 1235 of file PPCInstrInfo.cpp.
References llvm::array_lengthof(), llvm::TargetRegisterClass::begin(), llvm::MachineOperand::clobbersPhysReg(), llvm::TargetRegisterClass::contains(), llvm::TargetRegisterClass::end(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), I, llvm::ARM_PROC::IE, llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isRegMask().
bool PPCInstrInfo::findCommutedOpIndices | ( | MachineInstr * | MI, |
unsigned & | SrcOpIdx1, | ||
unsigned & | SrcOpIdx2 | ||
) | const [override] |
Definition at line 302 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
bool PPCInstrInfo::FoldImmediate | ( | MachineInstr * | UseMI, |
MachineInstr * | DefMI, | ||
unsigned | Reg, | ||
MachineRegisterInfo * | MRI | ||
) | const [override] |
Definition at line 997 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::hasOneNonDBGUse(), llvm::MachineOperand::isImm(), llvm::PPCSubtarget::isPPC64(), llvm::MCInstrDesc::isPseudo(), llvm::MachineOperand::isReg(), LI, llvm::MCInstrDesc::OpInfo, and llvm::MachineOperand::setReg().
unsigned PPCInstrInfo::GetInstSizeInBytes | ( | const MachineInstr * | MI | ) | const |
GetInstSize - Return the number of bytes of code the specified instruction may be. This returns the maximum number of bytes.
Definition at line 1589 of file PPCInstrInfo.cpp.
References llvm::TargetMachine::getMCAsmInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MCInstrDesc::getSize(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), and llvm::ISD::INLINEASM.
void PPCInstrInfo::getNoopForMachoTarget | ( | MCInst & | NopInst | ) | const [override] |
getNoopForMachoTarget - Return the noop instruction to use for a noop.
Definition at line 335 of file PPCInstrInfo.cpp.
References llvm::MCInst::setOpcode().
int PPCInstrInfo::getOperandLatency | ( | const InstrItineraryData * | ItinData, |
const MachineInstr * | DefMI, | ||
unsigned | DefIdx, | ||
const MachineInstr * | UseMI, | ||
unsigned | UseIdx | ||
) | const [override] |
Definition at line 108 of file PPCInstrInfo.cpp.
References llvm::PPC::DIR_7400, llvm::PPC::DIR_750, llvm::PPC::DIR_970, llvm::PPC::DIR_E5500, llvm::PPC::DIR_PWR4, llvm::PPC::DIR_PWR5, llvm::PPC::DIR_PWR5X, llvm::PPC::DIR_PWR6, llvm::PPC::DIR_PWR6X, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, llvm::PPCSubtarget::getDarwinDirective(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), getRegisterInfo(), llvm::TargetRegisterClass::hasSuperClassEq(), llvm::MachineInstr::isBranch(), and llvm::TargetRegisterInfo::isVirtualRegister().
Referenced by getOperandLatency().
int llvm::PPCInstrInfo::getOperandLatency | ( | const InstrItineraryData * | ItinData, |
SDNode * | DefNode, | ||
unsigned | DefIdx, | ||
SDNode * | UseNode, | ||
unsigned | UseIdx | ||
) | const [inline, override] |
Definition at line 102 of file PPCInstrInfo.h.
References getOperandLatency().
const PPCRegisterInfo& llvm::PPCInstrInfo::getRegisterInfo | ( | ) | const [inline] |
getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As such, whenever a client has an instance of instruction info, it should always be able to get register info as well (through this method).
Definition at line 89 of file PPCInstrInfo.h.
Referenced by copyPhysReg(), getOperandLatency(), llvm::PPCSubtarget::getRegisterInfo(), and optimizeCompareInstr().
unsigned PPCInstrInfo::InsertBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock * | TBB, | ||
MachineBasicBlock * | FBB, | ||
const SmallVectorImpl< MachineOperand > & | Cond, | ||
DebugLoc | DL | ||
) | const [override] |
Definition at line 543 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addOperand(), llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::BuildMI(), llvm::SmallVectorBase::empty(), getReg(), llvm::PPCSubtarget::isPPC64(), llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, and llvm::SmallVectorTemplateCommon< T >::size().
void PPCInstrInfo::insertNoop | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI | ||
) | const [override] |
Definition at line 317 of file PPCInstrInfo.cpp.
References llvm::BuildMI(), llvm::PPC::DIR_PWR6, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, and llvm::PPCSubtarget::getDarwinDirective().
void PPCInstrInfo::insertSelect | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
DebugLoc | DL, | ||
unsigned | DstReg, | ||
const SmallVectorImpl< MachineOperand > & | Cond, | ||
unsigned | TrueReg, | ||
unsigned | FalseReg | ||
) | const [override] |
Definition at line 629 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::TargetRegisterClass::contains(), llvm::TargetOpcode::COPY, llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getRegInfo(), llvm::PPCSubtarget::hasISEL(), llvm_unreachable, llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, llvm::PPC::PRED_EQ, llvm::PPC::PRED_GE, llvm::PPC::PRED_GT, llvm::PPC::PRED_LE, llvm::PPC::PRED_LT, llvm::PPC::PRED_NE, llvm::PPC::PRED_NU, llvm::PPC::PRED_UN, and llvm::SmallVectorTemplateCommon< T >::size().
bool PPCInstrInfo::isCoalescableExtInstr | ( | const MachineInstr & | MI, |
unsigned & | SrcReg, | ||
unsigned & | DstReg, | ||
unsigned & | SubIdx | ||
) | const [override] |
Definition at line 159 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
unsigned PPCInstrInfo::isLoadFromStackSlot | ( | const MachineInstr * | MI, |
int & | FrameIndex | ||
) | const [override] |
Definition at line 173 of file PPCInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), and llvm::AArch64DB::LD.
bool PPCInstrInfo::isPredicable | ( | MachineInstr * | MI | ) | const [override] |
Definition at line 1271 of file PPCInstrInfo.cpp.
References llvm::PPCISD::BCTRL, and llvm::MachineInstr::getOpcode().
bool PPCInstrInfo::isPredicated | ( | const MachineInstr * | MI | ) | const [override] |
Definition at line 1088 of file PPCInstrInfo.cpp.
Referenced by isUnpredicatedTerminator().
bool llvm::PPCInstrInfo::isProfitableToDupForIfCvt | ( | MachineBasicBlock & | MBB, |
unsigned | NumCycles, | ||
const BranchProbability & | Probability | ||
) | const [inline, override] |
Definition at line 187 of file PPCInstrInfo.h.
bool llvm::PPCInstrInfo::isProfitableToIfCvt | ( | MachineBasicBlock & | MBB, |
unsigned | NumCycles, | ||
unsigned | ExtraPredCycles, | ||
const BranchProbability & | Probability | ||
) | const [inline, override] |
Definition at line 175 of file PPCInstrInfo.h.
bool PPCInstrInfo::isProfitableToIfCvt | ( | MachineBasicBlock & | TMBB, |
unsigned | NumT, | ||
unsigned | ExtraT, | ||
MachineBasicBlock & | FMBB, | ||
unsigned | NumF, | ||
unsigned | ExtraF, | ||
const BranchProbability & | Probability | ||
) | const [override] |
Definition at line 1079 of file PPCInstrInfo.cpp.
References MBBDefinesCTR().
bool llvm::PPCInstrInfo::isProfitableToUnpredicate | ( | MachineBasicBlock & | TMBB, |
MachineBasicBlock & | FMBB | ||
) | const [inline, override] |
Definition at line 194 of file PPCInstrInfo.h.
unsigned PPCInstrInfo::isStoreToStackSlot | ( | const MachineInstr * | MI, |
int & | FrameIndex | ||
) | const [override] |
Definition at line 199 of file PPCInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), and llvm::MachineOperand::isImm().
bool PPCInstrInfo::isUnpredicatedTerminator | ( | const MachineInstr * | MI | ) | const [override] |
Definition at line 1099 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::isBarrier(), llvm::MachineInstr::isBranch(), isPredicated(), and llvm::MachineInstr::isTerminator().
Referenced by AnalyzeBranch().
void PPCInstrInfo::loadRegFromStackSlot | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | DestReg, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override] |
Definition at line 950 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::addMemOperand(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::MachineBasicBlock::end(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineBasicBlock::getParent(), llvm::MachineBasicBlock::insert(), llvm::MachineMemOperand::MOLoad, llvm::PPCFunctionInfo::setHasNonRISpills(), llvm::PPCFunctionInfo::setHasSpills(), llvm::PPCFunctionInfo::setSpillsCR(), llvm::PPCFunctionInfo::setSpillsVRSAVE(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by llvm::PPCFrameLowering::restoreCalleeSavedRegisters().
bool PPCInstrInfo::optimizeCompareInstr | ( | MachineInstr * | CmpInstr, |
unsigned | SrcReg, | ||
unsigned | SrcReg2, | ||
int | Mask, | ||
int | Value, | ||
const MachineRegisterInfo * | MRI | ||
) | const [override] |
Definition at line 1314 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::addOperand(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::TargetOpcode::COPY, llvm::MachineOperand::CreateReg(), llvm::MachineInstr::definesRegister(), DisableCmpOpt, llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::MCInstrDesc::getImplicitDefs(), llvm::MCInstrDesc::getImplicitUses(), llvm::PPC::getNonRecordFormOpcode(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), getRegisterInfo(), llvm::MachineOperand::getSubReg(), llvm::PPC::getSwappedPredicate(), llvm::MachineRegisterInfo::getUniqueVRegDef(), I, llvm::ARM_PROC::IE, llvm::MCInstrDesc::ImplicitDefs, llvm::MCInstrDesc::ImplicitUses, llvm::PPCSubtarget::isPPC64(), llvm::RegState::Kill, llvm::AArch64CC::MI, llvm::MachineInstr::modifiesRegister(), llvm::PPC::PRED_EQ, llvm::PPC::PRED_NE, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineInstr::readsRegister(), llvm::MachineInstr::setDesc(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::MachineRegisterInfo::use_instr_begin(), and llvm::MachineRegisterInfo::use_instr_end().
bool PPCInstrInfo::PredicateInstruction | ( | MachineInstr * | MI, |
const SmallVectorImpl< MachineOperand > & | Pred | ||
) | const [override] |
Definition at line 1110 of file PPCInstrInfo.cpp.
References llvm::PPCISD::BCTRL, llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::PPCSubtarget::isPPC64(), llvm_unreachable, llvm::AArch64CC::MI, llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, llvm::MachineInstr::RemoveOperand(), and llvm::MachineInstr::setDesc().
unsigned PPCInstrInfo::RemoveBranch | ( | MachineBasicBlock & | MBB | ) | const [override] |
Definition at line 509 of file PPCInstrInfo.cpp.
References llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), and I.
bool PPCInstrInfo::ReverseBranchCondition | ( | SmallVectorImpl< MachineOperand > & | Cond | ) | const [override] |
Definition at line 987 of file PPCInstrInfo.cpp.
References getReg(), llvm::PPC::InvertPredicate(), and llvm::SmallVectorTemplateCommon< T >::size().
void PPCInstrInfo::storeRegToStackSlot | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | SrcReg, | ||
bool | isKill, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override] |
Definition at line 855 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::addMemOperand(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineBasicBlock::getParent(), llvm::MachineBasicBlock::insert(), llvm::MachineMemOperand::MOStore, llvm::PPCFunctionInfo::setHasNonRISpills(), llvm::PPCFunctionInfo::setHasSpills(), llvm::PPCFunctionInfo::setSpillsCR(), llvm::PPCFunctionInfo::setSpillsVRSAVE(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by llvm::PPCFrameLowering::spillCalleeSavedRegisters().
bool PPCInstrInfo::SubsumesPredicate | ( | const SmallVectorImpl< MachineOperand > & | Pred1, |
const SmallVectorImpl< MachineOperand > & | Pred2 | ||
) | const [override] |
Definition at line 1203 of file PPCInstrInfo.cpp.
References getReg(), llvm::PPC::PRED_EQ, llvm::PPC::PRED_GE, llvm::PPC::PRED_GT, llvm::PPC::PRED_LE, llvm::PPC::PRED_LT, and llvm::SmallVectorTemplateCommon< T >::size().