LLVM API Documentation
#include <SystemZInstrInfo.h>
Definition at line 114 of file SystemZInstrInfo.h.
SystemZInstrInfo::SystemZInstrInfo | ( | SystemZSubtarget & | STI | ) | [explicit] |
Definition at line 43 of file SystemZInstrInfo.cpp.
bool SystemZInstrInfo::AnalyzeBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock *& | TBB, | ||
MachineBasicBlock *& | FBB, | ||
SmallVectorImpl< MachineOperand > & | Cond, | ||
bool | AllowModify | ||
) | const [override] |
Definition at line 241 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::begin(), llvm::MCID::Branch, llvm::SystemZII::BranchNormal, llvm::SystemZII::Branch::CCMask, llvm::SystemZ::CCMASK_ANY, llvm::SystemZII::Branch::CCValid, llvm::SmallVectorImpl< T >::clear(), llvm::MachineOperand::CreateImm(), llvm::SmallVectorBase::empty(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::eraseFromParent(), getBranchInfo(), llvm::MachineOperand::getMBB(), I, llvm::MachineBasicBlock::isLayoutSuccessor(), llvm::MachineOperand::isMBB(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::SystemZII::Branch::Target, and llvm::SystemZII::Branch::Type.
bool SystemZInstrInfo::analyzeCompare | ( | const MachineInstr * | MI, |
unsigned & | SrcReg, | ||
unsigned & | SrcReg2, | ||
int & | Mask, | ||
int & | Value | ||
) | const [override] |
Definition at line 399 of file SystemZInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineInstr::isCompare(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().
MachineInstr * SystemZInstrInfo::convertToThreeAddress | ( | MachineFunction::iterator & | MFI, |
MachineBasicBlock::iterator & | MBBI, | ||
LiveVariables * | LV | ||
) | const [override] |
Definition at line 674 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addOperand(), llvm::MachineInstrBuilder::addReg(), allOnes(), llvm::APIntOps::And(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::TargetRegisterClass::contains(), finishConvertToThreeAddress(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::getKillRegState(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getSubReg(), llvm::SystemZSubtarget::hasDistinctOps(), I, interpretAndImmediate(), llvm::MachineOperand::isKill(), isRxSBGMask(), and llvm::TargetRegisterInfo::isVirtualRegister().
void SystemZInstrInfo::copyPhysReg | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
DebugLoc | DL, | ||
unsigned | DestReg, | ||
unsigned | SrcReg, | ||
bool | KillSrc | ||
) | const [override] |
Definition at line 553 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::getKillRegState(), llvm::MipsISD::LDR, and llvm_unreachable.
bool SystemZInstrInfo::expandPostRAPseudo | ( | MachineBasicBlock::iterator | MBBI | ) | const [override] |
Definition at line 872 of file SystemZInstrInfo.cpp.
References llvm::HexagonISD::ADJDYNALLOC, llvm::CallingConv::C, isHighReg(), llvm::AArch64DB::LD, and llvm::AArch64DB::ST.
MachineInstr * SystemZInstrInfo::foldMemoryOperandImpl | ( | MachineFunction & | MF, |
MachineInstr * | MI, | ||
const SmallVectorImpl< unsigned > & | Ops, | ||
int | FrameIndex | ||
) | const [override] |
Definition at line 747 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addOperand(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::SystemZII::getAccessSize(), llvm::MachineInstr::getDebugLoc(), llvm::MachineFunction::getFrameInfo(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineMemOperand::getSize(), llvm::SystemZII::HasIndex, llvm::MachineInstr::hasOneMemOperand(), I, llvm::isInt< 8 >(), isSimpleBD12Move(), llvm::MachineMemOperand::isVolatile(), llvm::AArch64DB::LD, llvm::MachineInstr::memoperands_begin(), llvm::SystemZISD::MVC, llvm::SystemZII::SimpleBDXLoad, llvm::SystemZII::SimpleBDXStore, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::MCInstrDesc::TSFlags.
MachineInstr * SystemZInstrInfo::foldMemoryOperandImpl | ( | MachineFunction & | MF, |
MachineInstr * | MI, | ||
const SmallVectorImpl< unsigned > & | Ops, | ||
MachineInstr * | LoadMI | ||
) | const [override] |
Definition at line 865 of file SystemZInstrInfo.cpp.
SystemZII::Branch SystemZInstrInfo::getBranchInfo | ( | const MachineInstr * | MI | ) | const |
Definition at line 1041 of file SystemZInstrInfo.cpp.
References llvm::ISD::BR, llvm::MCID::Branch, llvm::SystemZII::BranchC, llvm::SystemZII::BranchCG, llvm::SystemZII::BranchCL, llvm::SystemZII::BranchCLG, llvm::SystemZII::BranchCT, llvm::SystemZII::BranchCTG, llvm::SystemZII::BranchNormal, llvm::SystemZ::CCMASK_ANY, llvm::SystemZ::CCMASK_CMP_NE, llvm::SystemZ::CCMASK_ICMP, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm_unreachable.
Referenced by AnalyzeBranch(), and RemoveBranch().
unsigned SystemZInstrInfo::getCompareAndBranch | ( | unsigned | Opcode, |
const MachineInstr * | MI = nullptr |
||
) | const |
Definition at line 1206 of file SystemZInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::isInt< 8 >(), and llvm::isUInt< 8 >().
uint64_t SystemZInstrInfo::getInstSizeInBytes | ( | const MachineInstr * | MI | ) | const |
Definition at line 1031 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), 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.
unsigned SystemZInstrInfo::getLoadAndTest | ( | unsigned | Opcode | ) | const |
Definition at line 1148 of file SystemZInstrInfo.cpp.
References llvm::MipsISD::LDR, and llvm::AArch64CC::LT.
void SystemZInstrInfo::getLoadStoreOpcodes | ( | const TargetRegisterClass * | RC, |
unsigned & | LoadOpcode, | ||
unsigned & | StoreOpcode | ||
) | const |
Definition at line 1088 of file SystemZInstrInfo.cpp.
References llvm::AArch64DB::LD, llvm::AArch64CC::LE, llvm_unreachable, and llvm::AArch64DB::ST.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
unsigned SystemZInstrInfo::getOpcodeForOffset | ( | unsigned | Opcode, |
int64_t | Offset | ||
) | const |
Definition at line 1121 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::Has20BitOffset, llvm::SystemZII::Is128Bit, and llvm::MCInstrDesc::TSFlags.
const SystemZRegisterInfo& llvm::SystemZInstrInfo::getRegisterInfo | ( | ) | const [inline] |
Definition at line 196 of file SystemZInstrInfo.h.
Referenced by llvm::SystemZSubtarget::getRegisterInfo().
unsigned SystemZInstrInfo::InsertBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock * | TBB, | ||
MachineBasicBlock * | FBB, | ||
const SmallVectorImpl< MachineOperand > & | Cond, | ||
DebugLoc | DL | ||
) | const [override] |
Definition at line 363 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::BuildMI(), llvm::SmallVectorBase::empty(), and llvm::SmallVectorTemplateCommon< T >::size().
unsigned SystemZInstrInfo::isLoadFromStackSlot | ( | const MachineInstr * | MI, |
int & | FrameIndex | ||
) | const [override] |
Definition at line 206 of file SystemZInstrInfo.cpp.
References isSimpleMove(), and llvm::SystemZII::SimpleBDXLoad.
bool SystemZInstrInfo::isPredicable | ( | MachineInstr * | MI | ) | const [override] |
Definition at line 506 of file SystemZInstrInfo.cpp.
References getConditionalMove(), llvm::MachineInstr::getOpcode(), and llvm::SystemZSubtarget::hasLoadStoreOnCond().
bool SystemZInstrInfo::isProfitableToIfCvt | ( | MachineBasicBlock & | MBB, |
unsigned | NumCycles, | ||
unsigned | ExtraPredCycles, | ||
const BranchProbability & | Probability | ||
) | const [override] |
Definition at line 515 of file SystemZInstrInfo.cpp.
bool SystemZInstrInfo::isProfitableToIfCvt | ( | MachineBasicBlock & | TMBB, |
unsigned | NumCyclesT, | ||
unsigned | ExtraPredCyclesT, | ||
MachineBasicBlock & | FMBB, | ||
unsigned | NumCyclesF, | ||
unsigned | ExtraPredCyclesF, | ||
const BranchProbability & | Probability | ||
) | const [override] |
Definition at line 523 of file SystemZInstrInfo.cpp.
bool SystemZInstrInfo::isRxSBGMask | ( | uint64_t | Mask, |
unsigned | BitSize, | ||
unsigned & | Start, | ||
unsigned & | End | ||
) | const |
Definition at line 1178 of file SystemZInstrInfo.cpp.
References allOnes(), and isStringOfOnes().
Referenced by convertToThreeAddress().
bool SystemZInstrInfo::isStackSlotCopy | ( | const MachineInstr * | MI, |
int & | DestFrameIndex, | ||
int & | SrcFrameIndex | ||
) | const [override] |
Definition at line 216 of file SystemZInstrInfo.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::isFI(), and llvm::SystemZISD::MVC.
unsigned SystemZInstrInfo::isStoreToStackSlot | ( | const MachineInstr * | MI, |
int & | FrameIndex | ||
) | const [override] |
Definition at line 211 of file SystemZInstrInfo.cpp.
References isSimpleMove(), and llvm::SystemZII::SimpleBDXStore.
void SystemZInstrInfo::loadImmediate | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | Reg, | ||
uint64_t | Value | ||
) | const |
Definition at line 1230 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), llvm::isInt< 16 >(), and llvm::isInt< 32 >().
void SystemZInstrInfo::loadRegFromStackSlot | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | DestReg, | ||
int | FrameIdx, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override] |
Definition at line 606 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), and getLoadStoreOpcodes().
bool SystemZInstrInfo::optimizeCompareInstr | ( | MachineInstr * | CmpInstr, |
unsigned | SrcReg, | ||
unsigned | SrcReg2, | ||
int | Mask, | ||
int | Value, | ||
const MachineRegisterInfo * | MRI | ||
) | const [override] |
Definition at line 483 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::SystemZII::IsLogical, removeIPMBasedCompare(), and llvm::MCInstrDesc::TSFlags.
bool SystemZInstrInfo::PredicateInstruction | ( | MachineInstr * | MI, |
const SmallVectorImpl< MachineOperand > & | Pred | ||
) | const [override] |
Definition at line 533 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), getConditionalMove(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::SystemZSubtarget::hasLoadStoreOnCond(), llvm::RegState::Implicit, llvm::AArch64CC::MI, llvm::MachineInstr::setDesc(), and llvm::SmallVectorTemplateCommon< T >::size().
unsigned SystemZInstrInfo::RemoveBranch | ( | MachineBasicBlock & | MBB | ) | const [override] |
Definition at line 333 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), getBranchInfo(), I, llvm::MachineOperand::isMBB(), and llvm::SystemZII::Branch::Target.
bool SystemZInstrInfo::ReverseBranchCondition | ( | SmallVectorImpl< MachineOperand > & | Cond | ) | const [override] |
Definition at line 356 of file SystemZInstrInfo.cpp.
References llvm::SmallVectorTemplateCommon< T >::size().
void SystemZInstrInfo::storeRegToStackSlot | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | SrcReg, | ||
bool | isKill, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override] |
Definition at line 589 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::getKillRegState(), and getLoadStoreOpcodes().