|
LLVM 24.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 180 of file SystemZInstrInfo.h.
|
explicit |
Definition at line 63 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 391 of file SystemZInstrInfo.cpp.
References assert(), llvm::SystemZII::BranchNormal, llvm::SystemZ::CCMASK_ANY, Cond, llvm::MachineOperand::CreateImm(), getBranchInfo(), I, MBB, and TBB.
|
override |
Definition at line 553 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 2366 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 570 of file SystemZInstrInfo.cpp.
References llvm::MachineRegisterInfo::getRegClass(), and MBB.
|
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 264 of file SystemZInstrInfo.cpp.
References llvm::TargetInstrInfo::commuteInstructionImpl(), and MI.
|
override |
Definition at line 1084 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), allOnes(), llvm::BuildMI(), llvm::MachineInstr::definesRegister(), llvm::End, llvm::get(), llvm::getKillRegState(), Imm, interpretAndImmediate(), isRxSBGMask(), MBB, MI, llvm::LiveIntervals::removePhysRegDefAt(), llvm::LiveIntervals::ReplaceMachineInstrInMaps(), and transferDeadCC().
|
override |
Definition at line 851 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::Register::asMCReg(), llvm::BuildMI(), contains(), copyPhysReg(), DL, llvm::get(), llvm::getKillRegState(), llvm::Implicit, llvm::ImplicitDefine, llvm::SystemZ::IPM_CC, llvm_unreachable, MBB, and MBBI.
Referenced by copyPhysReg().
|
override |
Definition at line 2425 of file SystemZInstrInfo.cpp.
|
override |
Definition at line 1610 of file SystemZInstrInfo.cpp.
References llvm::get(), llvm::SystemZ::isHighReg(), and MI.
|
override |
Definition at line 645 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineRegisterInfo::createVirtualRegister(), DefMI, llvm::get(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineRegisterInfo::hasOneNonDBGUse(), llvm::Register::isVirtual(), loadImmediate(), MBB, llvm::MachineRegisterInfo::use_nodbg_empty(), and UseMI.
|
override |
Definition at line 1193 of file SystemZInstrInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, AbstractManglingParser< Derived, Alloc >::Ops, 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::SlotIndexes::getInstructionIndex(), llvm::MachineFrameInfo::getObjectSize(), llvm::VirtRegMap::getPhys(), getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), 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(), isSimpleBD12Move(), llvm::isUInt(), llvm::Register::isVirtual(), llvm::MachineMemOperand::isVolatile(), llvm::LiveRange::liveAt(), MI, llvm::MachineInstr::NoFPExcept, llvm::MachineInstr::NoSWrap, llvm::Offset, llvm::MCOI::OPERAND_REGISTER, llvm::MachineInstr::operands(), prepareCompareSwapOperands(), llvm::range_size(), Register, llvm::MachineOperand::setIsDead(), llvm::MachineRegisterInfo::setRegClass(), llvm::SystemZII::SimpleBDXLoad, llvm::SystemZII::SimpleBDXStore, Size, transferDeadCC(), transferMIFlag(), TRI, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 1526 of file SystemZInstrInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::MachineInstrBuilder::add(), llvm::MachineInstr::addRegisterDead(), llvm::sampleprof::Base, llvm::BuildMI(), llvm::get(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::isSSA(), MBB, MI, llvm::MachineInstr::NoFPExcept, llvm::MachineRegisterInfo::setRegClass(), and transferMIFlag().
| SystemZII::Branch SystemZInstrInfo::getBranchInfo | ( | const MachineInstr & | MI | ) | const |
Definition at line 1876 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(), and removeBranch().
| Register SystemZInstrInfo::getCompareSourceReg | ( | const MachineInstr & | Compare | ) | const |
Definition at line 2216 of file SystemZInstrInfo.cpp.
References assert(), isCompareZero(), and isLoadAndTestAsCmp().
|
override |
Definition at line 2402 of file SystemZInstrInfo.cpp.
References MI.
| unsigned SystemZInstrInfo::getFusedCompare | ( | unsigned | Opcode, |
| SystemZII::FusedCompareType | Type, | ||
| const MachineInstr * | MI = nullptr ) const |
Definition at line 2084 of file SystemZInstrInfo.cpp.
References llvm::SystemZII::CompareAndBranch, llvm::SystemZII::CompareAndReturn, llvm::SystemZII::CompareAndSibcall, llvm::SystemZII::CompareAndTrap, llvm::isInt(), llvm::isUInt(), and MI.
|
inlineoverride |
Definition at line 312 of file SystemZInstrInfo.h.
References C().
|
override |
Definition at line 1847 of file SystemZInstrInfo.cpp.
References llvm::getImm(), llvm::TargetMachine::getMCAsmInfo(), llvm::PatchPointOpers::getNumPatchBytes(), llvm::MachineFunction::getTarget(), and MI.
Definition at line 1164 of file SystemZInstrInfo.cpp.
Referenced by isAssociativeAndCommutative().
Definition at line 2031 of file SystemZInstrInfo.cpp.
Definition at line 2294 of file SystemZInstrInfo.cpp.
| void SystemZInstrInfo::getLoadStoreOpcodes | ( | const TargetRegisterClass * | RC, |
| unsigned & | LoadOpcode, | ||
| unsigned & | StoreOpcode ) const |
Definition at line 1928 of file SystemZInstrInfo.cpp.
References llvm_unreachable.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
|
override |
Definition at line 2451 of file SystemZInstrInfo.cpp.
References llvm::MCInstBuilder::addReg().
| unsigned SystemZInstrInfo::getOpcodeForOffset | ( | unsigned | Opcode, |
| int64_t | Offset, | ||
| const MachineInstr * | MI = nullptr ) const |
Definition at line 1978 of file SystemZInstrInfo.cpp.
References llvm::get(), llvm::SystemZMC::getFirstReg(), llvm::SystemZII::Has20BitOffset, llvm::SystemZII::Is128Bit, llvm::isInt(), llvm::isUInt(), MI, and llvm::Offset.
|
inline |
Definition at line 310 of file SystemZInstrInfo.h.
|
override |
Definition at line 2430 of file SystemZInstrInfo.cpp.
References llvm::ArrayRef().
Definition at line 2024 of file SystemZInstrInfo.cpp.
References llvm::get(), and llvm::SystemZII::Has20BitOffset.
|
override |
Definition at line 514 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), Cond, llvm::Count, DL, llvm::get(), MBB, and TBB.
|
override |
Definition at line 603 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), DL, llvm::get(), llvm::MachineRegisterInfo::getRegClass(), I, llvm_unreachable, MBB, and Opc.
|
override |
Definition at line 1132 of file SystemZInstrInfo.cpp.
References llvm::MachineInstr::FmNsz, llvm::MachineInstr::FmReassoc, llvm::MachineInstr::getFlag(), getInverseOpcode(), llvm::MachineInstr::getOpcode(), and Opc.
| bool SystemZInstrInfo::isCompareZero | ( | const MachineInstr & | Compare | ) | const |
Definition at line 2208 of file SystemZInstrInfo.cpp.
References isLoadAndTestAsCmp().
Referenced by getCompareSourceReg().
|
override |
Definition at line 2416 of file SystemZInstrInfo.cpp.
References MI.
| bool SystemZInstrInfo::isLoadAndTestAsCmp | ( | const MachineInstr & | MI | ) | const |
Definition at line 2199 of file SystemZInstrInfo.cpp.
References MI.
Referenced by getCompareSourceReg(), and isCompareZero().
|
override |
Definition at line 312 of file SystemZInstrInfo.cpp.
References isSimpleMove(), MI, and llvm::SystemZII::SimpleBDXLoad.
|
override |
Definition at line 322 of file SystemZInstrInfo.cpp.
References Accesses, assert(), llvm::cast(), MI, and llvm::SystemZII::SimpleBDXLoad.
|
override |
Definition at line 751 of file SystemZInstrInfo.cpp.
References MI.
|
override |
Definition at line 791 of file SystemZInstrInfo.cpp.
References MBB.
|
override |
Definition at line 762 of file SystemZInstrInfo.cpp.
References MBB.
|
override |
Definition at line 781 of file SystemZInstrInfo.cpp.
| bool SystemZInstrInfo::isRxSBGMask | ( | uint64_t | Mask, |
| unsigned | BitSize, | ||
| unsigned & | Start, | ||
| unsigned & | End ) const |
Definition at line 2055 of file SystemZInstrInfo.cpp.
References allOnes(), assert(), llvm::End, llvm::isShiftedMask_64(), and llvm::Length.
Referenced by convertToThreeAddress().
|
override |
Definition at line 2442 of file SystemZInstrInfo.cpp.
References llvm::TargetInstrInfo::isSchedulingBoundary(), MBB, and MI.
|
override |
Definition at line 368 of file SystemZInstrInfo.cpp.
References llvm::MachineFrameInfo::getObjectSize(), llvm::Length, and MI.
|
override |
Definition at line 317 of file SystemZInstrInfo.cpp.
References isSimpleMove(), MI, and llvm::SystemZII::SimpleBDXStore.
|
override |
Definition at line 345 of file SystemZInstrInfo.cpp.
References Accesses, assert(), llvm::cast(), MI, and llvm::SystemZII::SimpleBDXStore.
| void SystemZInstrInfo::loadImmediate | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | MBBI, | ||
| unsigned | Reg, | ||
| uint64_t | Value ) const |
Definition at line 2313 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dwarf_linker::DebugLoc, DL, llvm::get(), llvm::SystemZ::isImmLH(), llvm::SystemZ::isImmLL(), llvm::isInt(), llvm::MachineRegisterInfo::isSSA(), MBB, MBBI, and uint64_t.
Referenced by foldImmediate().
|
override |
Definition at line 1012 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::dwarf_linker::DebugLoc, DL, llvm::get(), getLoadStoreOpcodes(), MBB, and MBBI.
|
override |
Definition at line 798 of file SystemZInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), assert(), llvm::get(), llvm::Implicit, and MI.
| bool SystemZInstrInfo::prepareCompareSwapOperands | ( | MachineBasicBlock::iterator | MBBI | ) | const |
Definition at line 2221 of file SystemZInstrInfo.cpp.
References assert(), llvm::SystemZII::CCMaskFirst, llvm::SystemZII::CCMaskLast, llvm::MachineOperand::getImm(), llvm::make_range(), MBB, MBBI, MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SystemZ::reverseCCMask(), llvm::MachineOperand::setImm(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by foldMemoryOperandImpl().
|
override |
Definition at line 482 of file SystemZInstrInfo.cpp.
References assert(), llvm::Count, getBranchInfo(), llvm::SystemZII::Branch::hasMBBTarget(), I, and MBB.
|
override |
Definition at line 507 of file SystemZInstrInfo.cpp.
References assert(), Cond, and llvm::getImm().
|
override |
Definition at line 996 of file SystemZInstrInfo.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::dwarf_linker::DebugLoc, DL, llvm::get(), llvm::getKillRegState(), getLoadStoreOpcodes(), MBB, and MBBI.
|
inlineoverride |
Definition at line 289 of file SystemZInstrInfo.h.
|
override |
Definition at line 2344 of file SystemZInstrInfo.cpp.
References I, MI, and llvm::MCOI::OPERAND_MEMORY.