|
LLVM
5.0.0
|
#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 65 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 374 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, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::SystemZII::Branch::Target, and llvm::SystemZII::Branch::Type.
|
override |
Definition at line 537 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 1807 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().
|
override |
Definition at line 628 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 297 of file SystemZInstrInfo.cpp.
References llvm::MachineFunction::CloneMachineInstr(), llvm::TargetInstrInfo::commuteInstructionImpl(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), and MI.
|
override |
Definition at line 1029 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), allOnes(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::TargetRegisterClass::contains(), llvm::MachineFunction::CreateMachineInstr(), llvm::WebAssembly::End, 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(), llvm::SystemZSubtarget::hasMiscellaneousExtensions(), I, llvm::MachineBasicBlock::insert(), interpretAndImmediate(), llvm::MachineOperand::isKill(), isRxSBGMask(), llvm::TargetRegisterInfo::isVirtualRegister(), and MRI.
|
override |
Definition at line 847 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::SystemZSubtarget::hasVector(), llvm::RegState::Implicit, llvm::MipsISD::LDR, and llvm_unreachable().
|
override |
Definition at line 1272 of file SystemZInstrInfo.cpp.
References llvm::LanaiISD::ADJDYNALLOC, C, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), isHighReg(), L, llvm::ARM_MB::LD, llvm::MachineInstr::setDesc(), llvm::MachineOperand::setImm(), and llvm::ARM_MB::ST.
|
override |
Definition at line 698 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(), and llvm::MachineInstr::setDesc().
|
override |
Definition at line 1112 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(), and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 1265 of file SystemZInstrInfo.cpp.
| SystemZII::Branch SystemZInstrInfo::getBranchInfo | ( | const MachineInstr & | MI | ) | const |
Definition at line 1465 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::getFusedCompare | ( | unsigned | Opcode, |
| SystemZII::FusedCompareType | Type, | ||
| const MachineInstr * | MI = nullptr |
||
| ) | const |
Definition at line 1653 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::SystemZSubtarget::hasMiscellaneousExtensions(), llvm::isInt< 8 >(), and llvm::isUInt< 8 >().
|
override |
Definition at line 1455 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.
Definition at line 1583 of file SystemZInstrInfo.cpp.
References L, llvm::MipsISD::LDR, and llvm::AArch64CC::LT.
Definition at line 1768 of file SystemZInstrInfo.cpp.
References llvm::SystemZSubtarget::hasLoadAndTrap(), and L.
| void SystemZInstrInfo::getLoadStoreOpcodes | ( | const TargetRegisterClass * | RC, |
| unsigned & | LoadOpcode, | ||
| unsigned & | StoreOpcode | ||
| ) | const |
Definition at line 1513 of file SystemZInstrInfo.cpp.
References L, llvm::ARM_MB::LD, llvm::AArch64CC::LE, llvm_unreachable(), and llvm::ARM_MB::ST.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
Definition at line 1556 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::Has20BitOffset, llvm::SystemZII::Is128Bit, and llvm::MCInstrDesc::TSFlags.
|
inline |
Definition at line 265 of file SystemZInstrInfo.h.
Referenced by llvm::SystemZSubtarget::getRegisterInfo().
|
override |
Definition at line 498 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 661 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 341 of file SystemZInstrInfo.cpp.
References isSimpleMove(), and llvm::SystemZII::SimpleBDXLoad.
|
override |
Definition at line 753 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), and llvm::MCID::Return.
|
override |
Definition at line 793 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 764 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getLastNonDebugInstr(), and llvm::MachineBasicBlock::succ_empty().
|
override |
Definition at line 783 of file SystemZInstrInfo.cpp.
| bool SystemZInstrInfo::isRxSBGMask | ( | uint64_t | Mask, |
| unsigned | BitSize, | ||
| unsigned & | Start, | ||
| unsigned & | End | ||
| ) | const |
Definition at line 1624 of file SystemZInstrInfo.cpp.
References allOnes(), assert(), and isStringOfOnes().
Referenced by convertToThreeAddress(), llvm::SystemZTTIImpl::getIntImmCost(), and tryBuildVectorReplicate().
|
override |
Definition at line 351 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.
|
override |
Definition at line 346 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 1787 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), llvm::isInt< 16 >(), and llvm::isInt< 32 >().
|
override |
Definition at line 950 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), and getLoadStoreOpcodes().
|
override |
Definition at line 619 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineInstr::getDesc(), llvm::SystemZII::IsLogical, removeIPMBasedCompare(), and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 799 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::MachineInstr::getParent(), llvm::MachineBasicBlock::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 466 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), getBranchInfo(), I, llvm::MachineOperand::isMBB(), and llvm::SystemZII::Branch::Target.
|
override |
Definition at line 492 of file SystemZInstrInfo.cpp.
References assert(), and llvm::SmallVectorTemplateCommon< T >::size().
|
override |
Definition at line 935 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::getKillRegState(), and getLoadStoreOpcodes().
1.8.6