|
LLVM
4.0.0
|
#include <PPCInstrInfo.h>
Static Public Member Functions | |
| static bool | isVFRegister (unsigned Reg) |
| static bool | isVRRegister (unsigned Reg) |
Protected Member Functions | |
| MachineInstr * | commuteInstructionImpl (MachineInstr &MI, bool NewMI, unsigned OpIdx1, unsigned OpIdx2) const override |
| Commutes the operands in the given instruction. More... | |
Definition at line 76 of file PPCInstrInfo.h.
|
explicit |
Definition at line 67 of file PPCInstrInfo.cpp.
|
override |
Definition at line 449 of file PPCInstrInfo.cpp.
References B, llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineBasicBlock::begin(), llvm::MachineOperand::CreateImm(), llvm::MachineOperand::CreateReg(), DisableCTRLoopAnal, llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getLastNonDebugInstr(), 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().
|
override |
Definition at line 1512 of file PPCInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
|
override |
Definition at line 691 of file PPCInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::PPCSubtarget::hasISEL(), MRI, and llvm::ArrayRef< T >::size().
|
overrideprotected |
Commutes the operands in the given instruction.
The commutable operands are specified by their indices OpIdx1 and OpIdx2.
Do not call this method for a non-commutable instruction or for non-commutable pair of operand indices OpIdx1 and OpIdx2. Even though the instruction is commutable, the method may still fail to commute the operands, null pointer is returned in such cases.
For example, we can commute rlwimi instructions, but only if the rotate amt is zero. We also have to munge the immediates a bit.
Definition at line 323 of file PPCInstrInfo.cpp.
References assert(), llvm::BuildMI(), llvm::TargetInstrInfo::commuteInstructionImpl(), 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(), MI, llvm::MachineOperand::setImm(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), llvm::MachineOperand::setSubReg(), and llvm::MCOI::TIED_TO.
|
override |
Definition at line 846 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), getCRBitValue(), llvm::getCRFromCRBit(), llvm::MCRegisterInfo::getEncodingValue(), llvm::getKillRegState(), llvm::TargetRegisterInfo::getMatchingSuperReg(), llvm::MCInstrDesc::getNumOperands(), getRegisterInfo(), llvm::RegState::Kill, llvm_unreachable, llvm::PPCISD::MFOCRF, OR, and VSXSelfCopyCrash.
|
override |
CreateTargetHazardRecognizer - Return the hazard recognizer to use for this target when scheduling the DAG.
Definition at line 74 of file PPCInstrInfo.cpp.
References llvm::TargetInstrInfo::CreateTargetHazardRecognizer(), llvm::PPC::DIR_440, llvm::PPC::DIR_A2, llvm::PPC::DIR_E500mc, and llvm::PPC::DIR_E5500.
|
override |
CreateTargetPostRAHazardRecognizer - Return the postRA hazard recognizer to use for this target when scheduling the DAG.
Definition at line 91 of file PPCInstrInfo.cpp.
References assert(), 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::MachineFunction::getSubtarget(), llvm::ScheduleDAG::MF, and llvm::ScheduleDAG::TII.
|
override |
Definition at line 1845 of file PPCInstrInfo.cpp.
References llvm::BitmaskEnumDetail::Mask(), and llvm::PPCII::MO_ACCESS_MASK.
|
override |
Definition at line 1460 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, i, llvm::ARM_PROC::IE, llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isRegMask().
|
override |
Definition at line 1876 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::PPCSubtarget::hasP9Vector(), llvm::PPCSubtarget::isPPC64(), llvm::PPCSubtarget::isTargetLinux(), llvm::ARM_MB::LD, MI, Offset, R2, and llvm::MachineInstr::setDesc().
|
override |
Definition at line 407 of file PPCInstrInfo.cpp.
References llvm::TargetInstrInfo::findCommutedOpIndices(), llvm::PPC::getAltVSXFMAOpcode(), and llvm::MachineInstr::getOpcode().
|
override |
Definition at line 1226 of file PPCInstrInfo.cpp.
References assert(), 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(), llvm::MCInstrDesc::OpInfo, and llvm::MachineOperand::setReg().
|
override |
Definition at line 111 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::InstrItineraryData::getOperandCycle(), llvm::MCInstrDesc::getSchedClass(), i, llvm::MachineOperand::isDef(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isReg(), llvm::Latency, and UseOldLatencyCalc.
Referenced by getOperandLatency().
|
override |
GetInstSize - Return the number of bytes of code the specified instruction may be.
This returns the maximum number of bytes.
Definition at line 1825 of file PPCInstrInfo.cpp.
References Desc, llvm::TargetMachine::getMCAsmInfo(), llvm::StackMapOpers::getNumPatchBytes(), llvm::PatchPointOpers::getNumPatchBytes(), 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.
Referenced by llvm::PPCTargetLowering::getPrefLoopAlignment().
|
override |
Return true when there is potentially a faster code sequence for an instruction chain ending in <Root>.
All potential patterns are output in the <Pattern> array.
Definition at line 233 of file PPCInstrInfo.cpp.
References llvm::CodeGenOpt::Aggressive, llvm::TargetInstrInfo::getMachineCombinerPatterns(), llvm::TargetMachine::getOptLevel(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getTarget(), llvm::PPCSubtarget::getTargetMachine(), llvm::TargetMachine::Options, and llvm::TargetOptions::UnsafeFPMath.
|
override |
getNoopForMachoTarget - Return the noop instruction to use for a noop.
Definition at line 442 of file PPCInstrInfo.cpp.
References llvm::MCInst::setOpcode().
|
override |
Definition at line 141 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(), getInstrLatency(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::TargetRegisterClass::hasSuperClassEq(), llvm::MachineInstr::isBranch(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::Latency, and MRI.
|
inlineoverride |
Definition at line 131 of file PPCInstrInfo.h.
|
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 114 of file PPCInstrInfo.h.
Referenced by copyPhysReg(), llvm::PPCSubtarget::getRegisterInfo(), and optimizeCompareInstr().
|
override |
Definition at line 1866 of file PPCInstrInfo.cpp.
References llvm::makeArrayRef(), llvm::PPCII::MO_NLP_FLAG, llvm::PPCII::MO_NLP_HIDDEN_FLAG, llvm::PPCII::MO_PIC_FLAG, and llvm::PPCII::MO_PLT.
|
override |
Definition at line 1851 of file PPCInstrInfo.cpp.
References llvm::makeArrayRef(), llvm::MipsII::MO_DTPREL_LO, llvm::PPCII::MO_HA, llvm::AVRII::MO_LO, llvm::AArch64II::MO_TLS, llvm::PPCII::MO_TLSLD_LO, llvm::PPCII::MO_TOC_LO, llvm::PPCII::MO_TPREL_HA, and llvm::MipsII::MO_TPREL_LO.
|
inlineoverride |
Definition at line 138 of file PPCInstrInfo.h.
|
override |
Definition at line 642 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), addOperand(), llvm::MachineInstrBuilder::addOperand(), assert(), B, llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::BuildMI(), llvm::ArrayRef< T >::empty(), getReg(), llvm::PPCSubtarget::isPPC64(), llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, and llvm::ArrayRef< T >::size().
|
override |
Definition at line 422 of file PPCInstrInfo.cpp.
References llvm::BuildMI(), llvm::PPC::DIR_PWR6, llvm::PPC::DIR_PWR7, llvm::PPC::DIR_PWR8, llvm::PPC::DIR_PWR9, and llvm::PPCSubtarget::getDarwinDirective().
|
override |
Definition at line 731 of file PPCInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::TargetRegisterClass::contains(), llvm::MachineBasicBlock::getParent(), getReg(), llvm::MachineFunction::getRegInfo(), llvm::PPCSubtarget::hasISEL(), MRI, llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, llvm::PPC::PRED_EQ, llvm::PPC::PRED_EQ_MINUS, llvm::PPC::PRED_EQ_PLUS, llvm::PPC::PRED_GE, llvm::PPC::PRED_GE_MINUS, llvm::PPC::PRED_GE_PLUS, llvm::PPC::PRED_GT, llvm::PPC::PRED_GT_MINUS, llvm::PPC::PRED_GT_PLUS, llvm::PPC::PRED_LE, llvm::PPC::PRED_LE_MINUS, llvm::PPC::PRED_LE_PLUS, llvm::PPC::PRED_LT, llvm::PPC::PRED_LT_MINUS, llvm::PPC::PRED_LT_PLUS, llvm::PPC::PRED_NE, llvm::PPC::PRED_NE_MINUS, llvm::PPC::PRED_NE_PLUS, llvm::PPC::PRED_NU, llvm::PPC::PRED_NU_MINUS, llvm::PPC::PRED_NU_PLUS, llvm::PPC::PRED_UN, llvm::PPC::PRED_UN_MINUS, llvm::PPC::PRED_UN_PLUS, and llvm::ArrayRef< T >::size().
|
override |
Definition at line 199 of file PPCInstrInfo.cpp.
References llvm::ISD::FADD, llvm::ISD::FMUL, and llvm::MachineInstr::getOpcode().
|
override |
Definition at line 249 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
|
override |
Definition at line 263 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(), llvm::ARM_MB::LD, and llvm::PPCISD::LXVD2X.
|
override |
Definition at line 1496 of file PPCInstrInfo.cpp.
References B, llvm::PPCISD::BCTRL, and llvm::MachineInstr::getOpcode().
|
override |
Definition at line 1317 of file PPCInstrInfo.cpp.
Referenced by isUnpredicatedTerminator().
|
inlineoverride |
Definition at line 232 of file PPCInstrInfo.h.
|
inlineoverride |
Definition at line 220 of file PPCInstrInfo.h.
|
override |
Definition at line 1308 of file PPCInstrInfo.cpp.
References MBBDefinesCTR().
|
inlineoverride |
Definition at line 237 of file PPCInstrInfo.h.
|
override |
Definition at line 293 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::PPCISD::STXVD2X.
|
override |
Definition at line 1328 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::isBarrier(), llvm::MachineInstr::isBranch(), isPredicated(), and llvm::MachineInstr::isTerminator().
Referenced by analyzeBranch().
Definition at line 286 of file PPCInstrInfo.h.
Referenced by llvm::PPCInstPrinter::printOperand().
Definition at line 289 of file PPCInstrInfo.h.
Referenced by llvm::PPCInstPrinter::printOperand().
|
override |
Definition at line 1170 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::PPCSubtarget::hasVSX(), i, 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().
|
override |
Definition at line 1540 of file PPCInstrInfo.cpp.
References llvm::MachineInstr::addOperand(), llvm::MachineInstrBuilder::addReg(), assert(), B, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineInstr::clearRegisterDeads(), llvm::MachineOperand::CreateReg(), llvm::MachineInstr::definesRegister(), DisableCmpOpt, E, 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, i, llvm::ARM_PROC::IE, llvm::MCInstrDesc::ImplicitDefs, llvm::MCInstrDesc::ImplicitUses, llvm::PPCSubtarget::isPPC64(), llvm::RegState::Kill, 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(), llvm::MachineRegisterInfo::use_instr_end(), and UseMI.
|
override |
Definition at line 1339 of file PPCInstrInfo.cpp.
References B, 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, MBB, MI, llvm::PPC::PRED_BIT_SET, llvm::PPC::PRED_BIT_UNSET, llvm::MachineInstr::RemoveOperand(), and llvm::MachineInstr::setDesc().
|
override |
Definition at line 610 of file PPCInstrInfo.cpp.
References assert(), B, llvm::PPCISD::BDNZ, llvm::PPCISD::BDZ, llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getLastNonDebugInstr(), and I.
|
override |
Definition at line 1216 of file PPCInstrInfo.cpp.
References assert(), getReg(), llvm::PPC::InvertPredicate(), and llvm::SmallVectorTemplateCommon< T >::size().
|
override |
Definition at line 1049 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(), i, llvm::MachineBasicBlock::insert(), llvm::MachineMemOperand::MOStore, llvm::PPCFunctionInfo::setHasNonRISpills(), llvm::PPCFunctionInfo::setHasSpills(), llvm::PPCFunctionInfo::setSpillsCR(), llvm::PPCFunctionInfo::setSpillsVRSAVE(), llvm::SmallVectorTemplateCommon< T >::size(), and updatedRC().
Referenced by llvm::PPCFrameLowering::spillCalleeSavedRegisters().
|
override |
Definition at line 1429 of file PPCInstrInfo.cpp.
References assert(), getReg(), llvm::PPC::PRED_EQ, llvm::PPC::PRED_GE, llvm::PPC::PRED_GT, llvm::PPC::PRED_LE, llvm::PPC::PRED_LT, and llvm::ArrayRef< T >::size().
| const TargetRegisterClass * PPCInstrInfo::updatedRC | ( | const TargetRegisterClass * | RC | ) | const |
Definition at line 1929 of file PPCInstrInfo.cpp.
References llvm::PPCSubtarget::hasVSX().
Referenced by storeRegToStackSlot().
|
inlineoverride |
Definition at line 147 of file PPCInstrInfo.h.
1.8.6