LLVM
15.0.0git
|
#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 175 of file SystemZInstrInfo.h.
|
explicit |
Definition at line 61 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 358 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MCID::Branch, llvm::SystemZII::BranchNormal, llvm::SystemZ::CCMASK_ANY, Cond, llvm::MachineOperand::CreateImm(), llvm::MachineBasicBlock::end(), getBranchInfo(), I, llvm::MachineBasicBlock::isLayoutSuccessor(), and MBB.
|
override |
Definition at line 521 of file SystemZInstrInfo.cpp.
References assert(), llvm::BitmaskEnumDetail::Mask(), and MI.
|
override |
Definition at line 2001 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 538 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SystemZSubtarget::hasLoadStoreOnCond(), llvm::SystemZSubtarget::hasLoadStoreOnCond2(), MBB, 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 277 of file SystemZInstrInfo.cpp.
References llvm::TargetInstrInfo::commuteInstructionImpl(), and MI.
|
override |
Definition at line 954 of file SystemZInstrInfo.cpp.
References allOnes(), llvm::And, interpretAndImmediate(), MBB, and MI.
|
override |
Definition at line 778 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), DL, get, llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::SystemZSubtarget::hasVector(), llvm::RegState::Implicit, llvm::SystemZ::IPM_CC, llvm::MipsISD::LDR, llvm_unreachable, MBB, and MBBI.
|
override |
Definition at line 1344 of file SystemZInstrInfo.cpp.
References llvm::LanaiISD::ADJDYNALLOC, get, llvm::SystemZ::isHighReg(), llvm::ARM_MB::LD, MI, llvm::ARM_MB::ST, and llvm::AArch64ISD::STG.
|
override |
Definition at line 614 of file SystemZInstrInfo.cpp.
References DefMI, get, llvm::MachineInstrBuilder::getReg(), llvm::SystemZSubtarget::hasLoadStoreOnCond2(), llvm::MachineRegisterInfo::hasOneNonDBGUse(), LLVM_FALLTHROUGH, MRI, and UseMI.
|
override |
Definition at line 1005 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstr::addRegisterDead(), assert(), llvm::BuildMI(), contains(), llvm::LiveRange::createDeadDef(), llvm::MachineInstr::definesRegister(), E, llvm::MachineInstr::findRegisterDefOperand(), llvm::ISD::FrameIndex, llvm::MCRegister::from(), get, llvm::SystemZII::getAccessSize(), llvm::MachineFunction::getFrameInfo(), llvm::SlotIndexes::getInstructionIndex(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineFrameInfo::getObjectSize(), llvm::VirtRegMap::getPhys(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetRegisterInfo::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::SystemZ::getTargetMemOpcode(), llvm::LiveIntervals::getVNInfoAllocator(), llvm::SystemZII::HasIndex, I, llvm::MachineMemOperand::isAtomic(), llvm::isInt< 8 >(), isSimpleBD12Move(), llvm::isUInt< 16 >(), llvm::MCRegisterInfo::DiffListIterator::isValid(), llvm::Register::isVirtualRegister(), llvm::MachineMemOperand::isVolatile(), llvm::ARM_MB::LD, llvm::LiveRange::liveAt(), MI, MRI, llvm::SystemZISD::MVC, llvm::MachineInstr::NoFPExcept, llvm::MachineInstr::NoSWrap, llvm::MCOI::OPERAND_REGISTER, llvm::MachineInstr::operands(), llvm::MCOperandInfo::OperandType, llvm::MCInstrDesc::OpInfo, prepareCompareSwapOperands(), llvm::MCOperandInfo::RegClass, llvm::MachineOperand::setIsDead(), llvm::MachineRegisterInfo::setRegClass(), llvm::SystemZII::SimpleBDXLoad, llvm::SystemZII::SimpleBDXStore, llvm::ArrayRef< T >::size(), llvm::AArch64ISD::STG, transferDeadCC(), transferMIFlag(), TRI, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 1337 of file SystemZInstrInfo.cpp.
SystemZII::Branch SystemZInstrInfo::getBranchInfo | ( | const MachineInstr & | MI | ) | const |
Definition at line 1540 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::AsmGoto, 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::ISD::INLINEASM_BR, llvm_unreachable, and MI.
Referenced by analyzeBranch(), llvm::SystemZPostRASchedStrategy::enterMBB(), and removeBranch().
unsigned SystemZInstrInfo::getFusedCompare | ( | unsigned | Opcode, |
SystemZII::FusedCompareType | Type, | ||
const MachineInstr * | MI = nullptr |
||
) | const |
Definition at line 1739 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::CompareAndBranch, llvm::SystemZII::CompareAndReturn, llvm::SystemZII::CompareAndSibcall, llvm::SystemZII::CompareAndTrap, llvm::SystemZSubtarget::hasMiscellaneousExtensions(), llvm::isInt< 8 >(), llvm::isUInt< 8 >(), and MI.
|
override |
Definition at line 1523 of file SystemZInstrInfo.cpp.
References llvm::TargetMachine::getMCAsmInfo(), llvm::PatchPointOpers::getNumPatchBytes(), llvm::MachineFunction::getTarget(), and MI.
unsigned SystemZInstrInfo::getLoadAndTest | ( | unsigned | Opcode | ) | const |
Definition at line 1669 of file SystemZInstrInfo.cpp.
References llvm::MipsISD::LDR, and llvm::AArch64CC::LT.
unsigned SystemZInstrInfo::getLoadAndTrap | ( | unsigned | Opcode | ) | const |
Definition at line 1928 of file SystemZInstrInfo.cpp.
References llvm::SystemZSubtarget::hasLoadAndTrap().
void SystemZInstrInfo::getLoadStoreOpcodes | ( | const TargetRegisterClass * | RC, |
unsigned & | LoadOpcode, | ||
unsigned & | StoreOpcode | ||
) | const |
Definition at line 1592 of file SystemZInstrInfo.cpp.
References llvm::ARM_MB::LD, llvm::AArch64CC::LE, llvm_unreachable, llvm::ARM_MB::ST, and llvm::AArch64ISD::STG.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
unsigned SystemZInstrInfo::getOpcodeForOffset | ( | unsigned | Opcode, |
int64_t | Offset | ||
) | const |
Definition at line 1635 of file SystemZInstrInfo.cpp.
References get, llvm::SystemZII::Has20BitOffset, llvm::SystemZII::Is128Bit, and llvm::MCInstrDesc::TSFlags.
|
inline |
Definition at line 292 of file SystemZInstrInfo.h.
Referenced by llvm::SystemZSubtarget::getRegisterInfo().
bool SystemZInstrInfo::hasDisplacementPairInsn | ( | unsigned | Opcode | ) | const |
Definition at line 1662 of file SystemZInstrInfo.cpp.
References get, llvm::SystemZII::Has20BitOffset, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 482 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), Cond, DL, get, and MBB.
|
override |
Definition at line 572 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), DL, get, llvm::MachineBasicBlock::getParent(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SystemZSubtarget::hasLoadStoreOnCond2(), llvm::SystemZSubtarget::hasMiscellaneousExtensions3(), I, llvm_unreachable, MBB, MRI, and llvm::ArrayRef< T >::size().
|
override |
Definition at line 325 of file SystemZInstrInfo.cpp.
References llvm::ISD::FrameIndex, isSimpleMove(), MI, and llvm::SystemZII::SimpleBDXLoad.
|
override |
Definition at line 678 of file SystemZInstrInfo.cpp.
References MI.
|
override |
Definition at line 719 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 690 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getLastNonDebugInstr(), MBB, and llvm::MachineBasicBlock::succ_empty().
|
override |
Definition at line 709 of file SystemZInstrInfo.cpp.
bool SystemZInstrInfo::isRxSBGMask | ( | uint64_t | Mask, |
unsigned | BitSize, | ||
unsigned & | Start, | ||
unsigned & | End | ||
) | const |
Definition at line 1710 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 335 of file SystemZInstrInfo.cpp.
References llvm::MachineFrameInfo::getObjectSize(), MI, and llvm::SystemZISD::MVC.
|
override |
Definition at line 330 of file SystemZInstrInfo.cpp.
References llvm::ISD::FrameIndex, isSimpleMove(), MI, and llvm::SystemZII::SimpleBDXStore.
void SystemZInstrInfo::loadImmediate | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | Reg, | ||
uint64_t | Value | ||
) | const |
Definition at line 1947 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), DL, llvm::MachineBasicBlock::end(), get, llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), llvm::isInt< 16 >(), llvm::isInt< 32 >(), llvm::MachineRegisterInfo::isSSA(), MBB, MBBI, and MRI.
|
override |
Definition at line 885 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), get, getLoadStoreOpcodes(), MBB, and MBBI.
|
override |
Definition at line 725 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), assert(), get, llvm::RegState::Implicit, MI, and llvm::ArrayRef< T >::size().
bool SystemZInstrInfo::prepareCompareSwapOperands | ( | MachineBasicBlock::iterator | MBBI | ) | const |
Definition at line 1855 of file SystemZInstrInfo.cpp.
References llvm::LivePhysRegs::addLiveOuts(), assert(), llvm::SystemZII::CCMaskFirst, llvm::SystemZII::CCMaskLast, llvm::LivePhysRegs::contains(), llvm::MachineBasicBlock::end(), llvm::MachineOperand::getImm(), llvm::MachineBasicBlock::getParent(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), MBB, MBBI, llvm::SystemZ::reverseCCMask(), and llvm::MachineOperand::setImm().
Referenced by foldMemoryOperandImpl().
|
override |
Definition at line 450 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), getBranchInfo(), llvm::SystemZII::Branch::hasMBBTarget(), I, and MBB.
|
override |
Definition at line 476 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 870 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), get, llvm::getKillRegState(), getLoadStoreOpcodes(), MBB, and MBBI.
|
override |
Definition at line 1978 of file SystemZInstrInfo.cpp.
References E, llvm::MCInstrDesc::getNumOperands(), I, MI, llvm::MCOI::OPERAND_MEMORY, llvm::MCOperandInfo::OperandType, llvm::MCInstrDesc::OpInfo, and llvm::MCOperandInfo::RegClass.