LLVM  8.0.1
Public Member Functions | Protected Member Functions | List of all members
llvm::SystemZInstrInfo Class Reference

#include "Target/SystemZ/SystemZInstrInfo.h"

Inheritance diagram for llvm::SystemZInstrInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::SystemZInstrInfo:
Collaboration graph
[legend]

Public Member Functions

 SystemZInstrInfo (SystemZSubtarget &STI)
 
unsigned isLoadFromStackSlot (const MachineInstr &MI, int &FrameIndex) const override
 
unsigned isStoreToStackSlot (const MachineInstr &MI, int &FrameIndex) const override
 
bool isStackSlotCopy (const MachineInstr &MI, int &DestFrameIndex, int &SrcFrameIndex) const override
 
bool analyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
 
unsigned removeBranch (MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
 
unsigned insertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
 
bool analyzeCompare (const MachineInstr &MI, unsigned &SrcReg, unsigned &SrcReg2, int &Mask, int &Value) const override
 
bool canInsertSelect (const MachineBasicBlock &, ArrayRef< MachineOperand > Cond, unsigned, unsigned, int &, int &, int &) const override
 
void insertSelect (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, unsigned DstReg, ArrayRef< MachineOperand > Cond, unsigned TrueReg, unsigned FalseReg) const override
 
bool FoldImmediate (MachineInstr &UseMI, MachineInstr &DefMI, unsigned Reg, MachineRegisterInfo *MRI) const override
 
bool isPredicable (const MachineInstr &MI) const override
 
bool isProfitableToIfCvt (MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, BranchProbability Probability) const override
 
bool isProfitableToIfCvt (MachineBasicBlock &TMBB, unsigned NumCyclesT, unsigned ExtraPredCyclesT, MachineBasicBlock &FMBB, unsigned NumCyclesF, unsigned ExtraPredCyclesF, BranchProbability Probability) const override
 
bool isProfitableToDupForIfCvt (MachineBasicBlock &MBB, unsigned NumCycles, BranchProbability Probability) const override
 
bool PredicateInstruction (MachineInstr &MI, ArrayRef< MachineOperand > Pred) const override
 
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
 
void storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
 
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIdx, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
 
MachineInstrconvertToThreeAddress (MachineFunction::iterator &MFI, MachineInstr &MI, LiveVariables *LV) const override
 
MachineInstrfoldMemoryOperandImpl (MachineFunction &MF, MachineInstr &MI, ArrayRef< unsigned > Ops, MachineBasicBlock::iterator InsertPt, int FrameIndex, LiveIntervals *LIS=nullptr) const override
 
MachineInstrfoldMemoryOperandImpl (MachineFunction &MF, MachineInstr &MI, ArrayRef< unsigned > Ops, MachineBasicBlock::iterator InsertPt, MachineInstr &LoadMI, LiveIntervals *LIS=nullptr) const override
 
bool expandPostRAPseudo (MachineInstr &MBBI) const override
 
bool reverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const override
 
const SystemZRegisterInfogetRegisterInfo () const
 
unsigned getInstSizeInBytes (const MachineInstr &MI) const override
 
SystemZII::Branch getBranchInfo (const MachineInstr &MI) const
 
void getLoadStoreOpcodes (const TargetRegisterClass *RC, unsigned &LoadOpcode, unsigned &StoreOpcode) const
 
unsigned getOpcodeForOffset (unsigned Opcode, int64_t Offset) const
 
unsigned getLoadAndTest (unsigned Opcode) const
 
bool isRxSBGMask (uint64_t Mask, unsigned BitSize, unsigned &Start, unsigned &End) const
 
unsigned getFusedCompare (unsigned Opcode, SystemZII::FusedCompareType Type, const MachineInstr *MI=nullptr) const
 
unsigned getLoadAndTrap (unsigned Opcode) const
 
void loadImmediate (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned Reg, uint64_t Value) const
 
bool areMemAccessesTriviallyDisjoint (MachineInstr &MIa, MachineInstr &MIb, AliasAnalysis *AA=nullptr) const override
 

Protected Member Functions

MachineInstrcommuteInstructionImpl (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...
 

Detailed Description

Definition at line 145 of file SystemZInstrInfo.h.

Constructor & Destructor Documentation

◆ SystemZInstrInfo()

SystemZInstrInfo::SystemZInstrInfo ( SystemZSubtarget STI)
explicit

Member Function Documentation

◆ analyzeBranch()

bool SystemZInstrInfo::analyzeBranch ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const
override

◆ analyzeCompare()

bool SystemZInstrInfo::analyzeCompare ( const MachineInstr MI,
unsigned SrcReg,
unsigned SrcReg2,
int &  Mask,
int &  Value 
) const
override

◆ areMemAccessesTriviallyDisjoint()

bool SystemZInstrInfo::areMemAccessesTriviallyDisjoint ( MachineInstr MIa,
MachineInstr MIb,
AliasAnalysis AA = nullptr 
) const
override

◆ canInsertSelect()

bool SystemZInstrInfo::canInsertSelect ( const MachineBasicBlock MBB,
ArrayRef< MachineOperand Cond,
unsigned  TrueReg,
unsigned  FalseReg,
int &  CondCycles,
int &  TrueCycles,
int &  FalseCycles 
) const
override

◆ commuteInstructionImpl()

MachineInstr * SystemZInstrInfo::commuteInstructionImpl ( MachineInstr MI,
bool  NewMI,
unsigned  CommuteOpIdx1,
unsigned  CommuteOpIdx2 
) const
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.

◆ convertToThreeAddress()

MachineInstr * SystemZInstrInfo::convertToThreeAddress ( MachineFunction::iterator MFI,
MachineInstr MI,
LiveVariables LV 
) const
override

◆ copyPhysReg()

void SystemZInstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
const DebugLoc DL,
unsigned  DestReg,
unsigned  SrcReg,
bool  KillSrc 
) const
override

◆ expandPostRAPseudo()

bool SystemZInstrInfo::expandPostRAPseudo ( MachineInstr MBBI) const
override

◆ FoldImmediate()

bool SystemZInstrInfo::FoldImmediate ( MachineInstr UseMI,
MachineInstr DefMI,
unsigned  Reg,
MachineRegisterInfo MRI 
) const
override

◆ foldMemoryOperandImpl() [1/2]

MachineInstr * SystemZInstrInfo::foldMemoryOperandImpl ( MachineFunction MF,
MachineInstr MI,
ArrayRef< unsigned Ops,
MachineBasicBlock::iterator  InsertPt,
int  FrameIndex,
LiveIntervals LIS = nullptr 
) const
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.

◆ foldMemoryOperandImpl() [2/2]

MachineInstr * SystemZInstrInfo::foldMemoryOperandImpl ( MachineFunction MF,
MachineInstr MI,
ArrayRef< unsigned Ops,
MachineBasicBlock::iterator  InsertPt,
MachineInstr LoadMI,
LiveIntervals LIS = nullptr 
) const
override

Definition at line 1244 of file SystemZInstrInfo.cpp.

◆ getBranchInfo()

SystemZII::Branch SystemZInstrInfo::getBranchInfo ( const MachineInstr MI) const

◆ getFusedCompare()

unsigned SystemZInstrInfo::getFusedCompare ( unsigned  Opcode,
SystemZII::FusedCompareType  Type,
const MachineInstr MI = nullptr 
) const

◆ getInstSizeInBytes()

unsigned SystemZInstrInfo::getInstSizeInBytes ( const MachineInstr MI) const
override

◆ getLoadAndTest()

unsigned SystemZInstrInfo::getLoadAndTest ( unsigned  Opcode) const

Definition at line 1562 of file SystemZInstrInfo.cpp.

References llvm::MipsISD::LDR, and llvm::AArch64CC::LT.

◆ getLoadAndTrap()

unsigned SystemZInstrInfo::getLoadAndTrap ( unsigned  Opcode) const

Definition at line 1747 of file SystemZInstrInfo.cpp.

◆ getLoadStoreOpcodes()

void SystemZInstrInfo::getLoadStoreOpcodes ( const TargetRegisterClass RC,
unsigned LoadOpcode,
unsigned StoreOpcode 
) const

◆ getOpcodeForOffset()

unsigned SystemZInstrInfo::getOpcodeForOffset ( unsigned  Opcode,
int64_t  Offset 
) const

◆ getRegisterInfo()

const SystemZRegisterInfo& llvm::SystemZInstrInfo::getRegisterInfo ( ) const
inline

◆ insertBranch()

unsigned SystemZInstrInfo::insertBranch ( MachineBasicBlock MBB,
MachineBasicBlock TBB,
MachineBasicBlock FBB,
ArrayRef< MachineOperand Cond,
const DebugLoc DL,
int *  BytesAdded = nullptr 
) const
override

◆ insertSelect()

void SystemZInstrInfo::insertSelect ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
const DebugLoc DL,
unsigned  DstReg,
ArrayRef< MachineOperand Cond,
unsigned  TrueReg,
unsigned  FalseReg 
) const
override

◆ isLoadFromStackSlot()

unsigned SystemZInstrInfo::isLoadFromStackSlot ( const MachineInstr MI,
int &  FrameIndex 
) const
override

Definition at line 347 of file SystemZInstrInfo.cpp.

References isSimpleMove(), and llvm::SystemZII::SimpleBDXLoad.

◆ isPredicable()

bool SystemZInstrInfo::isPredicable ( const MachineInstr MI) const
override

◆ isProfitableToDupForIfCvt()

bool SystemZInstrInfo::isProfitableToDupForIfCvt ( MachineBasicBlock MBB,
unsigned  NumCycles,
BranchProbability  Probability 
) const
override

Definition at line 725 of file SystemZInstrInfo.cpp.

Referenced by isProfitableToIfCvt().

◆ isProfitableToIfCvt() [1/2]

bool SystemZInstrInfo::isProfitableToIfCvt ( MachineBasicBlock MBB,
unsigned  NumCycles,
unsigned  ExtraPredCycles,
BranchProbability  Probability 
) const
override

◆ isProfitableToIfCvt() [2/2]

bool SystemZInstrInfo::isProfitableToIfCvt ( MachineBasicBlock TMBB,
unsigned  NumCyclesT,
unsigned  ExtraPredCyclesT,
MachineBasicBlock FMBB,
unsigned  NumCyclesF,
unsigned  ExtraPredCyclesF,
BranchProbability  Probability 
) const
override

Definition at line 715 of file SystemZInstrInfo.cpp.

References isProfitableToDupForIfCvt().

◆ isRxSBGMask()

bool SystemZInstrInfo::isRxSBGMask ( uint64_t  Mask,
unsigned  BitSize,
unsigned Start,
unsigned End 
) const

Definition at line 1603 of file SystemZInstrInfo.cpp.

Referenced by insertDAGNode().

◆ isStackSlotCopy()

bool SystemZInstrInfo::isStackSlotCopy ( const MachineInstr MI,
int &  DestFrameIndex,
int &  SrcFrameIndex 
) const
override

◆ isStoreToStackSlot()

unsigned SystemZInstrInfo::isStoreToStackSlot ( const MachineInstr MI,
int &  FrameIndex 
) const
override

Definition at line 352 of file SystemZInstrInfo.cpp.

References isSimpleMove(), and llvm::SystemZII::SimpleBDXStore.

◆ loadImmediate()

void SystemZInstrInfo::loadImmediate ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned  Reg,
uint64_t  Value 
) const

◆ loadRegFromStackSlot()

void SystemZInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned  DestReg,
int  FrameIdx,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const
override

◆ PredicateInstruction()

bool SystemZInstrInfo::PredicateInstruction ( MachineInstr MI,
ArrayRef< MachineOperand Pred 
) const
override

◆ removeBranch()

unsigned SystemZInstrInfo::removeBranch ( MachineBasicBlock MBB,
int *  BytesRemoved = nullptr 
) const
override

◆ reverseBranchCondition()

bool SystemZInstrInfo::reverseBranchCondition ( SmallVectorImpl< MachineOperand > &  Cond) const
override

Definition at line 498 of file SystemZInstrInfo.cpp.

References assert(), and llvm::SmallVectorBase::size().

Referenced by removeBranch().

◆ storeRegToStackSlot()

void SystemZInstrInfo::storeRegToStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned  SrcReg,
bool  isKill,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const
override

The documentation for this class was generated from the following files: