LLVM  6.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::VLIWResourceModel Class Reference

#include "Target/Hexagon/HexagonMachineScheduler.h"

Collaboration diagram for llvm::VLIWResourceModel:
Collaboration graph
[legend]

Public Member Functions

 VLIWResourceModel (const TargetSubtargetInfo &STI, const TargetSchedModel *SM)
 
 ~VLIWResourceModel ()
 
void resetPacketState ()
 
void resetDFA ()
 
void reset ()
 
bool isResourceAvailable (SUnit *SU)
 Check if scheduling of this SU is possible in the current packet. More...
 
bool reserveResources (SUnit *SU)
 Keep track of available resources. More...
 
void savePacket ()
 Save the last formed packet. More...
 
unsigned getTotalPackets () const
 
bool isInPacket (SUnit *SU) const
 

Public Attributes

std::vector< SUnit * > OldPacket
 Save the last formed packet. More...
 

Detailed Description

Definition at line 36 of file HexagonMachineScheduler.h.

Constructor & Destructor Documentation

◆ VLIWResourceModel()

llvm::VLIWResourceModel::VLIWResourceModel ( const TargetSubtargetInfo STI,
const TargetSchedModel SM 
)
inline

◆ ~VLIWResourceModel()

llvm::VLIWResourceModel::~VLIWResourceModel ( )
inline

Definition at line 70 of file HexagonMachineScheduler.h.

Member Function Documentation

◆ getTotalPackets()

unsigned llvm::VLIWResourceModel::getTotalPackets ( ) const
inline

Definition at line 90 of file HexagonMachineScheduler.h.

◆ isInPacket()

bool llvm::VLIWResourceModel::isInPacket ( SUnit SU) const
inline

Definition at line 91 of file HexagonMachineScheduler.h.

References llvm::is_contained().

◆ isResourceAvailable()

bool VLIWResourceModel::isResourceAvailable ( SUnit SU)

Check if scheduling of this SU is possible in the current packet.

It is not precise (statefull), it is more like another heuristic. Many corner cases are figured empirically.

Definition at line 77 of file HexagonMachineScheduler.cpp.

References llvm::DFAPacketizer::canReserveResources(), E, llvm::SUnit::getInstr(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), I, and llvm::ISD::INLINEASM.

Referenced by reserveResources(), and reset().

◆ reserveResources()

bool VLIWResourceModel::reserveResources ( SUnit SU)

◆ reset()

void llvm::VLIWResourceModel::reset ( )
inline

◆ resetDFA()

void llvm::VLIWResourceModel::resetDFA ( )
inline

Definition at line 78 of file HexagonMachineScheduler.h.

References llvm::DFAPacketizer::clearResources().

◆ resetPacketState()

void llvm::VLIWResourceModel::resetPacketState ( )
inline

Definition at line 74 of file HexagonMachineScheduler.h.

◆ savePacket()

void VLIWResourceModel::savePacket ( )

Save the last formed packet.

Definition at line 68 of file HexagonMachineScheduler.cpp.

References OldPacket.

Referenced by reserveResources(), and reset().

Member Data Documentation

◆ OldPacket

std::vector<SUnit *> llvm::VLIWResourceModel::OldPacket

Save the last formed packet.

Definition at line 53 of file HexagonMachineScheduler.h.

Referenced by savePacket().


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