LLVM
8.0.1
|
#include "Target/SystemZ/SystemZInstrInfo.h"
Protected Member Functions | |
MachineInstr * | commuteInstructionImpl (MachineInstr &MI, bool NewMI, unsigned CommuteOpIdx1, unsigned CommuteOpIdx2) const override |
Commutes the operands in the given instruction by changing the operands order and/or changing the instruction's opcode and/or the immediate value operand. More... | |
Definition at line 145 of file SystemZInstrInfo.h.
|
explicit |
Definition at line 69 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::SystemZMC::CallFrameSize, llvm::MachineFunction::CloneMachineInstr(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineFunction::getFrameInfo(), llvm::MachineOperand::getImm(), llvm::getKillRegState(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::MachineInstr::getNumOperands(), getOpcodeForOffset(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::getUndefRegState(), I, llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::MachineBasicBlock::insert(), isHighReg(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUndef(), llvm::MachineOperand::isUse(), MI, Reg, llvm::MachineInstr::setDesc(), llvm::MachineOperand::setImm(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setReg(), Size, llvm::MachineInstr::tieOperands(), and llvm::RegState::Undef.
|
override |
Definition at line 380 of file SystemZInstrInfo.cpp.
References assert(), 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 >::push_back(), llvm::SmallVectorBase::size(), llvm::SystemZII::Branch::Target, and llvm::SystemZII::Branch::Type.
|
override |
Definition at line 543 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineInstr::isCompare(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().
|
override |
Definition at line 1786 of file SystemZInstrInfo.cpp.
References llvm::MachineMemOperand::getOffset(), llvm::MachineMemOperand::getPseudoValue(), llvm::MachineMemOperand::getSize(), llvm::MachineMemOperand::getValue(), llvm::MachineInstr::hasOneMemOperand(), and llvm::MachineInstr::memoperands_begin().
Referenced by loadImmediate().
|
override |
Definition at line 560 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SystemZSubtarget::hasLoadStoreOnCond(), llvm::SystemZSubtarget::hasLoadStoreOnCond2(), MRI, and llvm::ArrayRef< T >::size().
|
overrideprotected |
Commutes the operands in the given instruction by changing the operands order and/or changing the instruction's opcode and/or the immediate value operand.
The arguments 'CommuteOpIdx1' and 'CommuteOpIdx2' specify the operands to be commuted.
Do not call this method for a non-commutable instruction or non-commutable operands. Even though the instruction is commutable, the method may still fail to commute the operands, null pointer is returned in such cases.
Definition at line 303 of file SystemZInstrInfo.cpp.
References llvm::MachineFunction::CloneMachineInstr(), llvm::TargetInstrInfo::commuteInstructionImpl(), llvm::MachineInstr::getOpcode(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), and MI.
|
override |
Definition at line 978 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), allOnes(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::TargetRegisterClass::contains(), llvm::MachineFunction::CreateMachineInstr(), finishConvertToThreeAddress(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::getKillRegState(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getSubReg(), I, llvm::MachineBasicBlock::insert(), interpretAndImmediate(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isVirtualRegister(), and MRI.
|
override |
Definition at line 779 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::SystemZSubtarget::hasVector(), llvm::RegState::Implicit, llvm::SystemZISD::IPM, llvm::SystemZ::IPM_CC, llvm::MipsISD::LDR, llvm_unreachable, and TRI.
|
override |
Definition at line 1251 of file SystemZInstrInfo.cpp.
References llvm::LanaiISD::ADJDYNALLOC, C, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), isHighReg(), llvm::ARM_MB::LD, llvm::MachineInstr::setDesc(), llvm::MachineOperand::setImm(), and llvm::ARM_MB::ST.
|
override |
Definition at line 630 of file SystemZInstrInfo.cpp.
References llvm::MachineOperand::ChangeToImmediate(), llvm::MachineInstr::eraseFromParent(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SystemZSubtarget::hasLoadStoreOnCond2(), llvm::MachineRegisterInfo::hasOneNonDBGUse(), Reg, and llvm::MachineInstr::setDesc().
|
override |
Definition at line 1061 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::LiveRange::createDeadDef(), llvm::MachineInstr::findRegisterDefOperand(), llvm::SystemZII::getAccessSize(), llvm::MachineInstr::getDebugLoc(), llvm::MachineFunction::getFrameInfo(), llvm::MachineOperand::getImm(), llvm::SlotIndexes::getInstructionIndex(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetRegisterInfo::getRegSizeInBits(), llvm::SlotIndex::getRegSlot(), llvm::LiveIntervals::getRegUnit(), llvm::MachineMemOperand::getSize(), llvm::LiveIntervals::getSlotIndexes(), llvm::MachineFunction::getSubtarget(), llvm::LiveIntervals::getVNInfoAllocator(), llvm::SystemZII::HasIndex, llvm::MachineInstr::hasOneMemOperand(), I, llvm::isInt< 8 >(), isSimpleBD12Move(), llvm::MCRegisterInfo::DiffListIterator::isValid(), llvm::MachineMemOperand::isVolatile(), llvm::ARM_MB::LD, llvm::LiveRange::liveAt(), llvm::MachineInstr::memoperands_begin(), llvm::SystemZISD::MVC, llvm::MachineOperand::setIsDead(), llvm::SystemZII::SimpleBDXLoad, llvm::SystemZII::SimpleBDXStore, llvm::ArrayRef< T >::size(), transferDeadCC(), TRI, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 1244 of file SystemZInstrInfo.cpp.
SystemZII::Branch SystemZInstrInfo::getBranchInfo | ( | const MachineInstr & | MI | ) | const |
Definition at line 1444 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(), llvm::SystemZPostRASchedStrategy::enterMBB(), and removeBranch().
unsigned SystemZInstrInfo::getFusedCompare | ( | unsigned | Opcode, |
SystemZII::FusedCompareType | Type, | ||
const MachineInstr * | MI = nullptr |
||
) | const |
Definition at line 1632 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::CompareAndBranch, llvm::SystemZII::CompareAndReturn, llvm::SystemZII::CompareAndSibcall, llvm::SystemZII::CompareAndTrap, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::isInt< 8 >(), and llvm::isUInt< 8 >().
|
override |
Definition at line 1434 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MCInstrDesc::getSize(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), and llvm::ISD::INLINEASM.
Referenced by EmitNop().
Definition at line 1562 of file SystemZInstrInfo.cpp.
References llvm::MipsISD::LDR, and llvm::AArch64CC::LT.
Definition at line 1747 of file SystemZInstrInfo.cpp.
void SystemZInstrInfo::getLoadStoreOpcodes | ( | const TargetRegisterClass * | RC, |
unsigned & | LoadOpcode, | ||
unsigned & | StoreOpcode | ||
) | const |
Definition at line 1492 of file SystemZInstrInfo.cpp.
References llvm::ARM_MB::LD, llvm::AArch64CC::LE, llvm_unreachable, and llvm::ARM_MB::ST.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
Definition at line 1535 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::Has20BitOffset, llvm::SystemZII::Is128Bit, and llvm::MCInstrDesc::TSFlags.
Referenced by createPHIsForSelects(), and SystemZInstrInfo().
|
inline |
Definition at line 262 of file SystemZInstrInfo.h.
Referenced by llvm::SystemZSubtarget::getRegisterInfo(), and llvm::SystemZHazardRecognizer::Reset().
|
override |
Definition at line 504 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
override |
Definition at line 593 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineBasicBlock::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SystemZSubtarget::hasLoadStoreOnCond2(), llvm_unreachable, MRI, and llvm::ArrayRef< T >::size().
|
override |
Definition at line 347 of file SystemZInstrInfo.cpp.
References isSimpleMove(), and llvm::SystemZII::SimpleBDXLoad.
|
override |
Definition at line 685 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), isProfitableToIfCvt(), and llvm::MCID::Return.
|
override |
Definition at line 725 of file SystemZInstrInfo.cpp.
Referenced by isProfitableToIfCvt().
|
override |
Definition at line 696 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getLastNonDebugInstr(), and llvm::MachineBasicBlock::succ_empty().
Referenced by isPredicable().
|
override |
Definition at line 715 of file SystemZInstrInfo.cpp.
References isProfitableToDupForIfCvt().
bool SystemZInstrInfo::isRxSBGMask | ( | uint64_t | Mask, |
unsigned | BitSize, | ||
unsigned & | Start, | ||
unsigned & | End | ||
) | const |
Definition at line 1603 of file SystemZInstrInfo.cpp.
Referenced by insertDAGNode().
|
override |
Definition at line 357 of file SystemZInstrInfo.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::isFI(), and llvm::SystemZISD::MVC.
|
override |
Definition at line 352 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 1766 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), areMemAccessesTriviallyDisjoint(), assert(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), llvm::isInt< 16 >(), and llvm::isInt< 32 >().
|
override |
Definition at line 899 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), and getLoadStoreOpcodes().
|
override |
Definition at line 731 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), assert(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getRegMask(), llvm::RegState::Implicit, MI, llvm::MachineInstr::RemoveOperand(), llvm::MCID::Return, llvm::MachineInstr::setDesc(), and llvm::ArrayRef< T >::size().
|
override |
Definition at line 472 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), getBranchInfo(), I, llvm::MachineOperand::isMBB(), reverseBranchCondition(), and llvm::SystemZII::Branch::Target.
|
override |
Definition at line 498 of file SystemZInstrInfo.cpp.
References assert(), and llvm::SmallVectorBase::size().
Referenced by removeBranch().
|
override |
Definition at line 884 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::getKillRegState(), and getLoadStoreOpcodes().