LLVM 20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::HexagonPacketizerList Class Reference

#include "Target/Hexagon/HexagonVLIWPacketizer.h"

Inheritance diagram for llvm::HexagonPacketizerList:
Inheritance graph
[legend]

Public Member Functions

 HexagonPacketizerList (MachineFunction &MF, MachineLoopInfo &MLI, AAResults *AA, const MachineBranchProbabilityInfo *MBPI, bool Minimal)
 
void initPacketizerState () override
 
bool ignorePseudoInstruction (const MachineInstr &MI, const MachineBasicBlock *MBB) override
 
bool isSoloInstruction (const MachineInstr &MI) override
 
bool isLegalToPacketizeTogether (SUnit *SUI, SUnit *SUJ) override
 
bool isLegalToPruneDependencies (SUnit *SUI, SUnit *SUJ) override
 
bool foundLSInPacket ()
 
MachineBasicBlock::iterator addToPacket (MachineInstr &MI) override
 
void endPacket (MachineBasicBlock *MBB, MachineBasicBlock::iterator MI) override
 
bool shouldAddToPacket (const MachineInstr &MI) override
 
void unpacketizeSoloInstrs (MachineFunction &MF)
 
- Public Member Functions inherited from llvm::VLIWPacketizerList
 VLIWPacketizerList (MachineFunction &MF, MachineLoopInfo &MLI, AAResults *AA)
 
VLIWPacketizerListoperator= (const VLIWPacketizerList &other)=delete
 
 VLIWPacketizerList (const VLIWPacketizerList &other)=delete
 
virtual ~VLIWPacketizerList ()
 
void PacketizeMIs (MachineBasicBlock *MBB, MachineBasicBlock::iterator BeginItr, MachineBasicBlock::iterator EndItr)
 
DFAPacketizergetResourceTracker ()
 
virtual MachineBasicBlock::iterator addToPacket (MachineInstr &MI)
 
virtual void endPacket (MachineBasicBlock *MBB, MachineBasicBlock::iterator MI)
 
virtual void initPacketizerState ()
 
virtual bool ignorePseudoInstruction (const MachineInstr &I, const MachineBasicBlock *MBB)
 
virtual bool isSoloInstruction (const MachineInstr &MI)
 
virtual bool shouldAddToPacket (const MachineInstr &MI)
 
virtual bool isLegalToPacketizeTogether (SUnit *SUI, SUnit *SUJ)
 
virtual bool isLegalToPruneDependencies (SUnit *SUI, SUnit *SUJ)
 
void addMutation (std::unique_ptr< ScheduleDAGMutation > Mutation)
 
bool alias (const MachineInstr &MI1, const MachineInstr &MI2, bool UseTBAA=true) const
 

Protected Member Functions

bool getmemShufDisabled ()
 
void setmemShufDisabled (bool val)
 
bool isCallDependent (const MachineInstr &MI, SDep::Kind DepType, unsigned DepReg)
 
bool promoteToDotCur (MachineInstr &MI, SDep::Kind DepType, MachineBasicBlock::iterator &MII, const TargetRegisterClass *RC)
 
bool canPromoteToDotCur (const MachineInstr &MI, const SUnit *PacketSU, unsigned DepReg, MachineBasicBlock::iterator &MII, const TargetRegisterClass *RC)
 
void cleanUpDotCur ()
 
bool promoteToDotNew (MachineInstr &MI, SDep::Kind DepType, MachineBasicBlock::iterator &MII, const TargetRegisterClass *RC)
 
bool canPromoteToDotNew (const MachineInstr &MI, const SUnit *PacketSU, unsigned DepReg, MachineBasicBlock::iterator &MII, const TargetRegisterClass *RC)
 
bool canPromoteToNewValue (const MachineInstr &MI, const SUnit *PacketSU, unsigned DepReg, MachineBasicBlock::iterator &MII)
 
bool canPromoteToNewValueStore (const MachineInstr &MI, const MachineInstr &PacketMI, unsigned DepReg)
 
bool demoteToDotOld (MachineInstr &MI)
 
bool useCallersSP (MachineInstr &MI)
 
void useCalleesSP (MachineInstr &MI)
 
bool updateOffset (SUnit *SUI, SUnit *SUJ)
 Return true if we can update the offset in MI so that MI and MJ can be packetized together.
 
void undoChangedOffset (MachineInstr &MI)
 Undo the changed offset.
 
bool arePredicatesComplements (MachineInstr &MI1, MachineInstr &MI2)
 
bool restrictingDepExistInPacket (MachineInstr &, unsigned)
 
bool isNewifiable (const MachineInstr &MI, const TargetRegisterClass *NewRC)
 
bool isCurifiable (MachineInstr &MI)
 
bool cannotCoexist (const MachineInstr &MI, const MachineInstr &MJ)
 
bool isPromotedToDotNew () const
 
bool tryAllocateResourcesForConstExt (bool Reserve)
 
bool canReserveResourcesForConstExt ()
 
void reserveResourcesForConstExt ()
 
bool hasDeadDependence (const MachineInstr &I, const MachineInstr &J)
 
bool hasControlDependence (const MachineInstr &I, const MachineInstr &J)
 
bool hasRegMaskDependence (const MachineInstr &I, const MachineInstr &J)
 
bool hasDualStoreDependence (const MachineInstr &I, const MachineInstr &J)
 
bool producesStall (const MachineInstr &MI)
 
unsigned int calcStall (const MachineInstr &MI)
 

Protected Attributes

const MachineBranchProbabilityInfoMBPI
 A handle to the branch probability pass.
 
const MachineLoopInfoMLI
 
- Protected Attributes inherited from llvm::VLIWPacketizerList
MachineFunctionMF
 
const TargetInstrInfoTII
 
AAResultsAA
 
DefaultVLIWSchedulerVLIWScheduler
 
std::vector< MachineInstr * > CurrentPacketMIs
 
DFAPacketizerResourceTracker
 
std::map< MachineInstr *, SUnit * > MIToSUnit
 

Detailed Description

Definition at line 27 of file HexagonVLIWPacketizer.h.

Constructor & Destructor Documentation

◆ HexagonPacketizerList()

hexagon Hexagon false HexagonPacketizerList::HexagonPacketizerList ( MachineFunction MF,
MachineLoopInfo MLI,
AAResults AA,
const MachineBranchProbabilityInfo MBPI,
bool  Minimal 
)

Definition at line 134 of file HexagonVLIWPacketizer.cpp.

Member Function Documentation

◆ addToPacket()

MachineBasicBlock::iterator HexagonPacketizerList::addToPacket ( MachineInstr MI)
overridevirtual

◆ arePredicatesComplements()

bool HexagonPacketizerList::arePredicatesComplements ( MachineInstr MI1,
MachineInstr MI2 
)
protected

◆ calcStall()

unsigned int HexagonPacketizerList::calcStall ( const MachineInstr MI)
protected

◆ cannotCoexist()

bool HexagonPacketizerList::cannotCoexist ( const MachineInstr MI,
const MachineInstr MJ 
)
protected

Definition at line 1161 of file HexagonVLIWPacketizer.cpp.

References cannotCoexistAsymm(), and MI.

Referenced by isLegalToPacketizeTogether(), and isLegalToPruneDependencies().

◆ canPromoteToDotCur()

bool HexagonPacketizerList::canPromoteToDotCur ( const MachineInstr MI,
const SUnit PacketSU,
unsigned  DepReg,
MachineBasicBlock::iterator MII,
const TargetRegisterClass RC 
)
protected

◆ canPromoteToDotNew()

bool HexagonPacketizerList::canPromoteToDotNew ( const MachineInstr MI,
const SUnit PacketSU,
unsigned  DepReg,
MachineBasicBlock::iterator MII,
const TargetRegisterClass RC 
)
protected

◆ canPromoteToNewValue()

bool HexagonPacketizerList::canPromoteToNewValue ( const MachineInstr MI,
const SUnit PacketSU,
unsigned  DepReg,
MachineBasicBlock::iterator MII 
)
protected

Definition at line 820 of file HexagonVLIWPacketizer.cpp.

References canPromoteToNewValueStore(), llvm::SUnit::getInstr(), and MI.

Referenced by canPromoteToDotNew().

◆ canPromoteToNewValueStore()

bool HexagonPacketizerList::canPromoteToNewValueStore ( const MachineInstr MI,
const MachineInstr PacketMI,
unsigned  DepReg 
)
protected

◆ canReserveResourcesForConstExt()

bool HexagonPacketizerList::canReserveResourcesForConstExt ( )
protected

Definition at line 288 of file HexagonVLIWPacketizer.cpp.

References tryAllocateResourcesForConstExt().

Referenced by addToPacket().

◆ cleanUpDotCur()

void HexagonPacketizerList::cleanUpDotCur ( )
protected

◆ demoteToDotOld()

bool HexagonPacketizerList::demoteToDotOld ( MachineInstr MI)
protected

Definition at line 471 of file HexagonVLIWPacketizer.cpp.

References MI.

Referenced by addToPacket(), and isLegalToPruneDependencies().

◆ endPacket()

void HexagonPacketizerList::endPacket ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI 
)
overridevirtual

Reimplemented from llvm::VLIWPacketizerList.

Definition at line 1789 of file HexagonVLIWPacketizer.cpp.

References llvm::VLIWPacketizerList::CurrentPacketMIs, and LLVM_DEBUG.

Referenced by addToPacket().

◆ foundLSInPacket()

bool HexagonPacketizerList::foundLSInPacket ( )

◆ getmemShufDisabled()

bool llvm::HexagonPacketizerList::getmemShufDisabled ( )
inlineprotected

Definition at line 113 of file HexagonVLIWPacketizer.h.

◆ hasControlDependence()

bool HexagonPacketizerList::hasControlDependence ( const MachineInstr I,
const MachineInstr J 
)
protected

◆ hasDeadDependence()

bool HexagonPacketizerList::hasDeadDependence ( const MachineInstr I,
const MachineInstr J 
)
protected

◆ hasDualStoreDependence()

bool HexagonPacketizerList::hasDualStoreDependence ( const MachineInstr I,
const MachineInstr J 
)
protected

◆ hasRegMaskDependence()

bool HexagonPacketizerList::hasRegMaskDependence ( const MachineInstr I,
const MachineInstr J 
)
protected

◆ ignorePseudoInstruction()

bool HexagonPacketizerList::ignorePseudoInstruction ( const MachineInstr MI,
const MachineBasicBlock MBB 
)
overridevirtual

◆ initPacketizerState()

void HexagonPacketizerList::initPacketizerState ( )
overridevirtual

Reimplemented from llvm::VLIWPacketizerList.

Definition at line 1034 of file HexagonVLIWPacketizer.cpp.

References INT64_MAX.

◆ isCallDependent()

bool HexagonPacketizerList::isCallDependent ( const MachineInstr MI,
SDep::Kind  DepType,
unsigned  DepReg 
)
protected

◆ isCurifiable()

bool llvm::HexagonPacketizerList::isCurifiable ( MachineInstr MI)
protected

◆ isLegalToPacketizeTogether()

bool HexagonPacketizerList::isLegalToPacketizeTogether ( SUnit SUI,
SUnit SUJ 
)
overridevirtual

◆ isLegalToPruneDependencies()

bool HexagonPacketizerList::isLegalToPruneDependencies ( SUnit SUI,
SUnit SUJ 
)
overridevirtual

◆ isNewifiable()

bool HexagonPacketizerList::isNewifiable ( const MachineInstr MI,
const TargetRegisterClass NewRC 
)
protected

Definition at line 360 of file HexagonVLIWPacketizer.cpp.

References MI.

Referenced by canPromoteToDotNew().

◆ isPromotedToDotNew()

bool llvm::HexagonPacketizerList::isPromotedToDotNew ( ) const
inlineprotected

Definition at line 150 of file HexagonVLIWPacketizer.h.

◆ isSoloInstruction()

bool HexagonPacketizerList::isSoloInstruction ( const MachineInstr MI)
overridevirtual

Reimplemented from llvm::VLIWPacketizerList.

Definition at line 1066 of file HexagonVLIWPacketizer.cpp.

References isSchedBarrier(), MI, and ScheduleInlineAsm.

Referenced by isLegalToPacketizeTogether().

◆ producesStall()

bool HexagonPacketizerList::producesStall ( const MachineInstr MI)
protected

Definition at line 1940 of file HexagonVLIWPacketizer.cpp.

References calcStall(), I, and llvm::Latency.

Referenced by addToPacket(), and shouldAddToPacket().

◆ promoteToDotCur()

bool HexagonPacketizerList::promoteToDotCur ( MachineInstr MI,
SDep::Kind  DepType,
MachineBasicBlock::iterator MII,
const TargetRegisterClass RC 
)
protected

Definition at line 376 of file HexagonVLIWPacketizer.cpp.

References assert(), llvm::SDep::Data, and MI.

Referenced by isLegalToPacketizeTogether().

◆ promoteToDotNew()

bool HexagonPacketizerList::promoteToDotNew ( MachineInstr MI,
SDep::Kind  DepType,
MachineBasicBlock::iterator MII,
const TargetRegisterClass RC 
)
protected

Definition at line 458 of file HexagonVLIWPacketizer.cpp.

References assert(), llvm::SDep::Data, MBPI, and MI.

Referenced by isLegalToPacketizeTogether().

◆ reserveResourcesForConstExt()

void HexagonPacketizerList::reserveResourcesForConstExt ( )
protected

Definition at line 283 of file HexagonVLIWPacketizer.cpp.

References llvm_unreachable, and tryAllocateResourcesForConstExt().

Referenced by addToPacket().

◆ restrictingDepExistInPacket()

bool HexagonPacketizerList::restrictingDepExistInPacket ( MachineInstr MI,
unsigned  DepReg 
)
protected

◆ setmemShufDisabled()

void llvm::HexagonPacketizerList::setmemShufDisabled ( bool  val)
inlineprotected

Definition at line 116 of file HexagonVLIWPacketizer.h.

Referenced by isLegalToPacketizeTogether().

◆ shouldAddToPacket()

bool HexagonPacketizerList::shouldAddToPacket ( const MachineInstr MI)
overridevirtual

◆ tryAllocateResourcesForConstExt()

bool HexagonPacketizerList::tryAllocateResourcesForConstExt ( bool  Reserve)
protected

◆ undoChangedOffset()

void HexagonPacketizerList::undoChangedOffset ( MachineInstr MI)
protected

Undo the changed offset.

This is needed if the instruction cannot be added to the current packet due to a different instruction.

Definition at line 552 of file HexagonVLIWPacketizer.cpp.

References llvm_unreachable, MI, and OP.

Referenced by isLegalToPruneDependencies().

◆ unpacketizeSoloInstrs()

void HexagonPacketizerList::unpacketizeSoloInstrs ( MachineFunction MF)

◆ updateOffset()

bool HexagonPacketizerList::updateOffset ( SUnit SUI,
SUnit SUJ 
)
protected

Return true if we can update the offset in MI so that MI and MJ can be packetized together.

Definition at line 516 of file HexagonVLIWPacketizer.cpp.

References llvm::SDep::Anti, assert(), llvm::SDep::Data, llvm::SUnit::getInstr(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), MI, llvm::Offset, and llvm::SUnit::Preds.

Referenced by isLegalToPruneDependencies().

◆ useCalleesSP()

void HexagonPacketizerList::useCalleesSP ( MachineInstr MI)
protected

◆ useCallersSP()

bool HexagonPacketizerList::useCallersSP ( MachineInstr MI)
protected

Member Data Documentation

◆ MBPI

const MachineBranchProbabilityInfo* llvm::HexagonPacketizerList::MBPI
protected

A handle to the branch probability pass.

Definition at line 72 of file HexagonVLIWPacketizer.h.

Referenced by canPromoteToDotNew(), and promoteToDotNew().

◆ MLI

const MachineLoopInfo* llvm::HexagonPacketizerList::MLI
protected

Definition at line 73 of file HexagonVLIWPacketizer.h.

Referenced by calcStall().


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