LLVM 19.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. | |
Definition at line 185 of file SystemZInstrInfo.h.
|
explicit |
Definition at line 61 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 371 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::SystemZII::BranchNormal, llvm::SystemZ::CCMASK_ANY, Cond, llvm::MachineOperand::CreateImm(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), getBranchInfo(), I, llvm::MachineBasicBlock::isLayoutSuccessor(), MBB, and TBB.
|
override |
Definition at line 533 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 2260 of file SystemZInstrInfo.cpp.
References llvm::MachineMemOperand::getOffset(), llvm::MachineMemOperand::getPseudoValue(), llvm::MachineMemOperand::getSize(), llvm::LocationSize::getValue(), llvm::MachineMemOperand::getValue(), llvm::MachineInstr::hasOneMemOperand(), llvm::LocationSize::hasValue(), and llvm::MachineInstr::memoperands_begin().
|
override |
Definition at line 550 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), 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 290 of file SystemZInstrInfo.cpp.
References llvm::TargetInstrInfo::commuteInstructionImpl(), and MI.
|
override |
Definition at line 1078 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), allOnes(), llvm::And, llvm::BuildMI(), End, llvm::get(), llvm::getKillRegState(), I, interpretAndImmediate(), isRxSBGMask(), LIS, MBB, MI, llvm::LiveVariables::replaceKillInstruction(), and transferDeadCC().
|
override |
Definition at line 858 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), copyPhysReg(), DL, llvm::get(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::SystemZ::IPM_CC, llvm_unreachable, MBB, and MBBI.
Referenced by copyPhysReg().
|
override |
Definition at line 1603 of file SystemZInstrInfo.cpp.
References llvm::get(), llvm::SystemZ::isHighReg(), and MI.
|
override |
Definition at line 652 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), DefMI, llvm::get(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstrBuilder::getReg(), llvm::Register::isVirtual(), loadImmediate(), MBB, MRI, and UseMI.
|
override |
Definition at line 1190 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(), llvm::MachineInstr::findRegisterDefOperand(), llvm::MCRegister::from(), llvm::get(), llvm::SystemZII::getAccessSize(), llvm::MachineFunction::getFrameInfo(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineFrameInfo::getObjectSize(), llvm::VirtRegMap::getPhys(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineMemOperand::getSize(), llvm::MachineFunction::getSubtarget(), llvm::SystemZ::getTargetMemOpcode(), llvm::SystemZII::HasIndex, I, llvm::MachineMemOperand::isAtomic(), isSimpleBD12Move(), llvm::Register::isVirtual(), llvm::MachineMemOperand::isVolatile(), LIS, llvm::LiveRange::liveAt(), MI, MRI, llvm::MachineInstr::NoFPExcept, llvm::MachineInstr::NoSWrap, llvm::Offset, llvm::MCOI::OPERAND_REGISTER, llvm::MachineInstr::operands(), llvm::MCInstrDesc::operands(), llvm::MCOperandInfo::OperandType, prepareCompareSwapOperands(), llvm::range_size(), llvm::MCOperandInfo::RegClass, llvm::MachineOperand::setIsDead(), llvm::SystemZII::SimpleBDXLoad, llvm::SystemZII::SimpleBDXStore, llvm::ArrayRef< T >::size(), Size, transferDeadCC(), transferMIFlag(), TRI, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 1520 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstr::addRegisterDead(), assert(), llvm::sampleprof::Base, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::get(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineBasicBlock::isLiveIn(), LHS, MBB, MI, MRI, llvm::MachineInstr::NoFPExcept, RHS, llvm::ArrayRef< T >::size(), and transferMIFlag().
SystemZII::Branch SystemZInstrInfo::getBranchInfo | ( | const MachineInstr & | MI | ) | const |
Definition at line 1799 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::AsmGoto, 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_unreachable, and MI.
Referenced by analyzeBranch(), llvm::SystemZPostRASchedStrategy::enterMBB(), and removeBranch().
|
override |
Definition at line 2296 of file SystemZInstrInfo.cpp.
References MI.
unsigned SystemZInstrInfo::getFusedCompare | ( | unsigned | Opcode, |
SystemZII::FusedCompareType | Type, | ||
const MachineInstr * | MI = nullptr |
||
) | const |
Definition at line 2000 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::CompareAndBranch, llvm::SystemZII::CompareAndReturn, llvm::SystemZII::CompareAndSibcall, llvm::SystemZII::CompareAndTrap, and MI.
|
override |
Definition at line 1782 of file SystemZInstrInfo.cpp.
References llvm::TargetMachine::getMCAsmInfo(), llvm::PatchPointOpers::getNumPatchBytes(), llvm::MachineFunction::getTarget(), and MI.
Definition at line 1161 of file SystemZInstrInfo.cpp.
Referenced by isAssociativeAndCommutative().
Definition at line 1947 of file SystemZInstrInfo.cpp.
Definition at line 2188 of file SystemZInstrInfo.cpp.
void SystemZInstrInfo::getLoadStoreOpcodes | ( | const TargetRegisterClass * | RC, |
unsigned & | LoadOpcode, | ||
unsigned & | StoreOpcode | ||
) | const |
Definition at line 1851 of file SystemZInstrInfo.cpp.
References llvm_unreachable.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
unsigned SystemZInstrInfo::getOpcodeForOffset | ( | unsigned | Opcode, |
int64_t | Offset, | ||
const MachineInstr * | MI = nullptr |
||
) | const |
Definition at line 1894 of file SystemZInstrInfo.cpp.
References llvm::get(), llvm::SystemZMC::getFirstReg(), llvm::SystemZII::Has20BitOffset, llvm::SystemZII::Is128Bit, MI, llvm::Offset, and llvm::MCInstrDesc::TSFlags.
|
inline |
Definition at line 314 of file SystemZInstrInfo.h.
Referenced by llvm::SystemZSubtarget::getRegisterInfo().
Definition at line 1940 of file SystemZInstrInfo.cpp.
References llvm::get(), llvm::SystemZII::Has20BitOffset, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 494 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), Cond, DL, llvm::get(), MBB, and TBB.
|
override |
Definition at line 584 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::get(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), I, llvm_unreachable, MBB, MRI, and llvm::ArrayRef< T >::size().
|
override |
Definition at line 1129 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::FmNsz, llvm::MachineInstr::FmReassoc, llvm::MachineInstr::getFlag(), getInverseOpcode(), and llvm::MachineInstr::getOpcode().
|
override |
Definition at line 338 of file SystemZInstrInfo.cpp.
References isSimpleMove(), MI, and llvm::SystemZII::SimpleBDXLoad.
|
override |
Definition at line 758 of file SystemZInstrInfo.cpp.
References MI.
|
override |
Definition at line 798 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 769 of file SystemZInstrInfo.cpp.
References llvm::MachineBasicBlock::getLastNonDebugInstr(), MBB, and llvm::MachineBasicBlock::succ_empty().
|
override |
Definition at line 788 of file SystemZInstrInfo.cpp.
bool SystemZInstrInfo::isRxSBGMask | ( | uint64_t | Mask, |
unsigned | BitSize, | ||
unsigned & | Start, | ||
unsigned & | End | ||
) | const |
Definition at line 1971 of file SystemZInstrInfo.cpp.
References allOnes(), assert(), End, llvm::isShiftedMask_64(), and llvm::Length.
Referenced by convertToThreeAddress().
|
override |
Definition at line 348 of file SystemZInstrInfo.cpp.
References llvm::MachineFrameInfo::getObjectSize(), llvm::Length, and MI.
|
override |
Definition at line 343 of file SystemZInstrInfo.cpp.
References isSimpleMove(), MI, and llvm::SystemZII::SimpleBDXStore.
void SystemZInstrInfo::loadImmediate | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | Reg, | ||
uint64_t | Value | ||
) | const |
Definition at line 2207 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::get(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), MBB, MBBI, and MRI.
Referenced by foldImmediate().
|
override |
Definition at line 1006 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::get(), getLoadStoreOpcodes(), MBB, and MBBI.
|
override |
Definition at line 626 of file SystemZInstrInfo.cpp.
References assert(), DefMI, llvm::MachineInstr::isSafeToMove(), MI, and MRI.
|
override |
Definition at line 805 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), assert(), llvm::get(), llvm::RegState::Implicit, MI, and llvm::ArrayRef< T >::size().
bool SystemZInstrInfo::prepareCompareSwapOperands | ( | MachineBasicBlock::iterator | MBBI | ) | const |
Definition at line 2115 of file SystemZInstrInfo.cpp.
References llvm::LiveRegUnits::addLiveOuts(), assert(), llvm::LiveRegUnits::available(), llvm::SystemZII::CCMaskFirst, llvm::SystemZII::CCMaskLast, llvm::MachineBasicBlock::end(), llvm::MachineOperand::getImm(), llvm::MachineBasicBlock::getParent(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), Idx, llvm::make_range(), MBB, MBBI, MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SystemZ::reverseCCMask(), llvm::MachineOperand::setImm(), and llvm::SmallVectorBase< Size_T >::size().
Referenced by foldMemoryOperandImpl().
|
override |
Definition at line 462 of file SystemZInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), getBranchInfo(), llvm::SystemZII::Branch::hasMBBTarget(), I, and MBB.
|
override |
Definition at line 487 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 991 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::get(), llvm::getKillRegState(), getLoadStoreOpcodes(), MBB, and MBBI.
|
inlineoverride |
Definition at line 294 of file SystemZInstrInfo.h.
|
override |
Definition at line 2238 of file SystemZInstrInfo.cpp.
References llvm::MCInstrDesc::getNumOperands(), I, MI, llvm::MCOI::OPERAND_MEMORY, llvm::MCInstrDesc::operands(), llvm::MCOperandInfo::OperandType, and llvm::MCOperandInfo::RegClass.