LLVM API Documentation

Public Member Functions
llvm::AArch64InstrInfo Class Reference

#include <AArch64InstrInfo.h>

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

List of all members.

Public Member Functions

 AArch64InstrInfo (const AArch64Subtarget &STI)
const AArch64RegisterInfogetRegisterInfo () const
unsigned GetInstSizeInBytes (const MachineInstr *MI) const
bool isAsCheapAsAMove (const MachineInstr *MI) const override
bool isCoalescableExtInstr (const MachineInstr &MI, unsigned &SrcReg, unsigned &DstReg, unsigned &SubIdx) const override
bool areMemAccessesTriviallyDisjoint (MachineInstr *MIa, MachineInstr *MIb, AliasAnalysis *AA=nullptr) const override
unsigned isLoadFromStackSlot (const MachineInstr *MI, int &FrameIndex) const override
unsigned isStoreToStackSlot (const MachineInstr *MI, int &FrameIndex) const override
bool hasShiftedReg (const MachineInstr *MI) const
 Return true if this is this instruction has a non-zero immediate.
bool hasExtendedReg (const MachineInstr *MI) const
 Return true if this is this instruction has a non-zero immediate.
bool isGPRZero (const MachineInstr *MI) const
 Does this instruction set its full destination register to zero?
bool isGPRCopy (const MachineInstr *MI) const
 Does this instruction rename a GPR without modifying bits?
bool isFPRCopy (const MachineInstr *MI) const
 Does this instruction rename an FPR without modifying bits?
bool isScaledAddr (const MachineInstr *MI) const
bool isLdStPairSuppressed (const MachineInstr *MI) const
 Check all MachineMemOperands for a hint to suppress pairing.
void suppressLdStPair (MachineInstr *MI) const
 Hint that pairing the given load or store is unprofitable.
bool getLdStBaseRegImmOfs (MachineInstr *LdSt, unsigned &BaseReg, unsigned &Offset, const TargetRegisterInfo *TRI) const override
bool getLdStBaseRegImmOfsWidth (MachineInstr *LdSt, unsigned &BaseReg, int &Offset, int &Width, const TargetRegisterInfo *TRI) const
bool enableClusterLoads () const override
bool shouldClusterLoads (MachineInstr *FirstLdSt, MachineInstr *SecondLdSt, unsigned NumLoads) const override
bool shouldScheduleAdjacent (MachineInstr *First, MachineInstr *Second) const override
MachineInstremitFrameIndexDebugValue (MachineFunction &MF, int FrameIx, uint64_t Offset, const MDNode *MDPtr, DebugLoc DL) const
void copyPhysRegTuple (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc, unsigned Opcode, llvm::ArrayRef< unsigned > Indices) const
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, 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 FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
MachineInstrfoldMemoryOperandImpl (MachineFunction &MF, MachineInstr *MI, const SmallVectorImpl< unsigned > &Ops, int FrameIndex) const override
bool AnalyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const override
unsigned RemoveBranch (MachineBasicBlock &MBB) const override
unsigned InsertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl< MachineOperand > &Cond, DebugLoc DL) const override
bool ReverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const override
bool canInsertSelect (const MachineBasicBlock &, const SmallVectorImpl< MachineOperand > &Cond, unsigned, unsigned, int &, int &, int &) const override
void insertSelect (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, DebugLoc DL, unsigned DstReg, const SmallVectorImpl< MachineOperand > &Cond, unsigned TrueReg, unsigned FalseReg) const override
void getNoopForMachoTarget (MCInst &NopInst) const override
bool analyzeCompare (const MachineInstr *MI, unsigned &SrcReg, unsigned &SrcReg2, int &CmpMask, int &CmpValue) const override
bool optimizeCompareInstr (MachineInstr *CmpInstr, unsigned SrcReg, unsigned SrcReg2, int CmpMask, int CmpValue, const MachineRegisterInfo *MRI) const override
bool hasPattern (MachineInstr &Root, SmallVectorImpl< MachineCombinerPattern::MC_PATTERN > &Pattern) const override
void genAlternativeCodeSequence (MachineInstr &Root, MachineCombinerPattern::MC_PATTERN P, SmallVectorImpl< MachineInstr * > &InsInstrs, SmallVectorImpl< MachineInstr * > &DelInstrs, DenseMap< unsigned, unsigned > &InstrIdxForVirtReg) const override
bool useMachineCombiner () const override
 useMachineCombiner - AArch64 supports MachineCombiner
bool expandPostRAPseudo (MachineBasicBlock::iterator MI) const override

Detailed Description

Definition at line 30 of file AArch64InstrInfo.h.


Constructor & Destructor Documentation

Definition at line 32 of file AArch64InstrInfo.cpp.


Member Function Documentation

bool AArch64InstrInfo::AnalyzeBranch ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify = false 
) const [override]
bool AArch64InstrInfo::analyzeCompare ( const MachineInstr MI,
unsigned SrcReg,
unsigned SrcReg2,
int CmpMask,
int CmpValue 
) const [override]

analyzeCompare - For a comparison instruction, return the source registers in SrcReg and SrcReg2, and the value it compares against in CmpValue. Return true if the comparison instruction can be analyzed.

Definition at line 649 of file AArch64InstrInfo.cpp.

References llvm::AArch64_AM::decodeLogicalImmediate(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().

bool AArch64InstrInfo::areMemAccessesTriviallyDisjoint ( MachineInstr MIa,
MachineInstr MIb,
AliasAnalysis AA = nullptr 
) const [override]
bool AArch64InstrInfo::canInsertSelect ( const MachineBasicBlock MBB,
const SmallVectorImpl< MachineOperand > &  Cond,
unsigned  TrueReg,
unsigned  FalseReg,
int CondCycles,
int TrueCycles,
int FalseCycles 
) const [override]
void AArch64InstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
DebugLoc  DL,
unsigned  DestReg,
unsigned  SrcReg,
bool  KillSrc 
) const [override]
void AArch64InstrInfo::copyPhysRegTuple ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
DebugLoc  DL,
unsigned  DestReg,
unsigned  SrcReg,
bool  KillSrc,
unsigned  Opcode,
llvm::ArrayRef< unsigned Indices 
) const
MachineInstr * AArch64InstrInfo::emitFrameIndexDebugValue ( MachineFunction MF,
int  FrameIx,
uint64_t  Offset,
const MDNode MDPtr,
DebugLoc  DL 
) const
bool llvm::AArch64InstrInfo::enableClusterLoads ( ) const [inline, override]

Definition at line 101 of file AArch64InstrInfo.h.

MachineInstr * AArch64InstrInfo::foldMemoryOperandImpl ( MachineFunction MF,
MachineInstr MI,
const SmallVectorImpl< unsigned > &  Ops,
int  FrameIndex 
) const [override]
void AArch64InstrInfo::genAlternativeCodeSequence ( MachineInstr Root,
MachineCombinerPattern::MC_PATTERN  Pattern,
SmallVectorImpl< MachineInstr * > &  InsInstrs,
SmallVectorImpl< MachineInstr * > &  DelInstrs,
DenseMap< unsigned, unsigned > &  InstrIdxForVirtReg 
) const [override]
bool AArch64InstrInfo::getLdStBaseRegImmOfs ( MachineInstr LdSt,
unsigned BaseReg,
unsigned Offset,
const TargetRegisterInfo TRI 
) const [override]
bool AArch64InstrInfo::getLdStBaseRegImmOfsWidth ( MachineInstr LdSt,
unsigned BaseReg,
int Offset,
int Width,
const TargetRegisterInfo TRI 
) const
void AArch64InstrInfo::getNoopForMachoTarget ( MCInst NopInst) const [override]

getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As such, whenever a client has an instance of instruction info, it should always be able to get register info as well (through this method).

Definition at line 46 of file AArch64InstrInfo.h.

Referenced by areMemAccessesTriviallyDisjoint(), copyPhysReg(), copyPhysRegTuple(), llvm::AArch64Subtarget::getRegisterInfo(), and optimizeCompareInstr().

Return true if this is this instruction has a non-zero immediate.

Returns true if there is an extendable register and that the extending value is non-zero.

Definition at line 1049 of file AArch64InstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::isImm().

Return true if this is this instruction has a non-zero immediate.

Returns true if there is a shiftable register and that the shift value is non-zero.

Definition at line 1003 of file AArch64InstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::isImm().

void AArch64InstrInfo::insertSelect ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
DebugLoc  DL,
unsigned  DstReg,
const SmallVectorImpl< MachineOperand > &  Cond,
unsigned  TrueReg,
unsigned  FalseReg 
) const [override]
bool AArch64InstrInfo::isCoalescableExtInstr ( const MachineInstr MI,
unsigned SrcReg,
unsigned DstReg,
unsigned SubIdx 
) const [override]

Check all MachineMemOperands for a hint to suppress pairing.

Return true if pairing the given load or store is hinted to be unprofitable.

Definition at line 1259 of file AArch64InstrInfo.cpp.

References llvm::MachineInstr::memoperands(), llvm::MachineMemOperand::MOTargetNumBits, and llvm::MachineMemOperand::MOTargetStartBit.

unsigned AArch64InstrInfo::isLoadFromStackSlot ( const MachineInstr MI,
int FrameIndex 
) const [override]

Return true if this is load/store scales or extends its register offset. This refers to scaling a dynamic index as opposed to scaled immediates. MI should be a memory op that allows scaled addressing.

Definition at line 1200 of file AArch64InstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::AArch64_AM::getMemDoShift(), llvm::AArch64_AM::getMemExtendType(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::AArch64_AM::UXTX.

unsigned AArch64InstrInfo::isStoreToStackSlot ( const MachineInstr MI,
int FrameIndex 
) const [override]
void AArch64InstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MBBI,
unsigned  DestReg,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const [override]
bool AArch64InstrInfo::optimizeCompareInstr ( MachineInstr CmpInstr,
unsigned  SrcReg,
unsigned  SrcReg2,
int  CmpMask,
int  CmpValue,
const MachineRegisterInfo MRI 
) const [override]
bool AArch64InstrInfo::shouldClusterLoads ( MachineInstr FirstLdSt,
MachineInstr SecondLdSt,
unsigned  NumLoads 
) const [override]

Detect opportunities for ldp/stp formation.

Only called for LdSt for which getLdStBaseRegImmOfs returns true.

Definition at line 1408 of file AArch64InstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::getOperand().

bool AArch64InstrInfo::shouldScheduleAdjacent ( MachineInstr First,
MachineInstr Second 
) const [override]

Definition at line 1426 of file AArch64InstrInfo.cpp.

References llvm::MachineInstr::getOpcode().

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

Hint that pairing the given load or store is unprofitable.

Set a flag on the first MachineMemOperand to suppress pairing.

Definition at line 1272 of file AArch64InstrInfo.cpp.

References llvm::MachineInstr::memoperands_begin(), llvm::MachineInstr::memoperands_empty(), llvm::MachineMemOperand::MOTargetNumBits, and llvm::MachineMemOperand::MOTargetStartBit.

useMachineCombiner - AArch64 supports MachineCombiner

useMachineCombiner - return true when a target supports MachineCombiner

Definition at line 2341 of file AArch64InstrInfo.cpp.


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