LLVM  15.0.0git
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::HexagonShuffler Class Reference

#include "Target/Hexagon/MCTargetDesc/HexagonShuffler.h"

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

Public Types

using iterator = HexagonPacket::iterator
 
using const_iterator = HexagonPacket::const_iterator
 
using packet_range = iterator_range< HexagonPacket::iterator >
 
using const_packet_range = iterator_range< HexagonPacket::const_iterator >
 
using InstPredicate = bool(*)(MCInstrInfo const &, MCInst const &)
 

Public Member Functions

 HexagonShuffler (MCContext &Context, bool ReportErrors, MCInstrInfo const &MCII, MCSubtargetInfo const &STI)
 
void reset ()
 
bool check (const bool RequireShuffle=true)
 Check that the packet is legal and enforce relative insn order. More...
 
bool shuffle ()
 
unsigned size () const
 
bool isMemReorderDisabled () const
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
packet_range insts (HexagonPacket &P)
 
const_packet_range insts (HexagonPacket const &P) const
 
packet_range insts ()
 
const_packet_range insts () const
 
bool HasInstWith (InstPredicate Pred) const
 
void append (MCInst const &ID, MCInst const *Extender, unsigned S)
 
void reportError (Twine const &Msg)
 
void reportResourceError (HexagonPacketSummary const &Summary, StringRef Err)
 
void reportResourceUsage (HexagonPacketSummary const &Summary)
 

Protected Member Functions

bool applySlotRestrictions (HexagonPacketSummary const &Summary, const bool DoShuffle)
 
void restrictSlot1AOK (HexagonPacketSummary const &Summary)
 
void restrictNoSlot1Store (HexagonPacketSummary const &Summary)
 
void restrictNoSlot1 ()
 
bool restrictStoreLoadOrder (HexagonPacketSummary const &Summary)
 
void restrictBranchOrder (HexagonPacketSummary const &Summary)
 
void restrictPreferSlot3 (HexagonPacketSummary const &Summary, const bool DoShuffle)
 
void permitNonSlot ()
 
Optional< HexagonPackettryAuction (HexagonPacketSummary const &Summary)
 
HexagonPacketSummary GetPacketSummary ()
 
bool ValidPacketMemoryOps (HexagonPacketSummary const &Summary) const
 
bool ValidResourceUsage (HexagonPacketSummary const &Summary)
 

Protected Attributes

MCContextContext
 
int64_t BundleFlags
 
const MCInstrInfoMCII
 
const MCSubtargetInfoSTI
 
SMLoc Loc
 
bool ReportErrors
 
bool CheckFailure
 
std::vector< std::pair< SMLoc, std::string > > AppliedRestrictions
 

Detailed Description

Definition at line 132 of file HexagonShuffler.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 190 of file HexagonShuffler.h.

◆ const_packet_range

Definition at line 192 of file HexagonShuffler.h.

◆ InstPredicate

Definition at line 223 of file HexagonShuffler.h.

◆ iterator

Definition at line 189 of file HexagonShuffler.h.

◆ packet_range

Definition at line 191 of file HexagonShuffler.h.

Constructor & Destructor Documentation

◆ HexagonShuffler()

HexagonShuffler::HexagonShuffler ( MCContext Context,
bool  ReportErrors,
MCInstrInfo const MCII,
MCSubtargetInfo const STI 
)

Definition at line 167 of file HexagonShuffler.cpp.

References reset().

Member Function Documentation

◆ append()

void HexagonShuffler::append ( MCInst const ID,
MCInst const Extender,
unsigned  S 
)

Definition at line 181 of file HexagonShuffler.cpp.

References MCII, S, and STI.

◆ applySlotRestrictions()

bool HexagonShuffler::applySlotRestrictions ( HexagonPacketSummary const Summary,
const bool  DoShuffle 
)
protected

◆ begin()

iterator llvm::HexagonShuffler::begin ( )
inline

Definition at line 210 of file HexagonShuffler.h.

Referenced by GetPacketSummary(), insts(), and restrictStoreLoadOrder().

◆ cbegin()

const_iterator llvm::HexagonShuffler::cbegin ( ) const
inline

Definition at line 212 of file HexagonShuffler.h.

Referenced by insts().

◆ cend()

const_iterator llvm::HexagonShuffler::cend ( ) const
inline

Definition at line 213 of file HexagonShuffler.h.

Referenced by insts().

◆ check()

bool HexagonShuffler::check ( const bool  RequireShuffle = true)

Check that the packet is legal and enforce relative insn order.

Definition at line 610 of file HexagonShuffler.cpp.

References applySlotRestrictions(), CheckFailure, GetPacketSummary(), reportError(), ValidPacketMemoryOps(), and ValidResourceUsage().

Referenced by shuffle().

◆ end()

iterator llvm::HexagonShuffler::end ( )
inline

Definition at line 211 of file HexagonShuffler.h.

Referenced by GetPacketSummary(), insts(), and restrictStoreLoadOrder().

◆ GetPacketSummary()

HexagonShuffler::HexagonPacketSummary HexagonShuffler::GetPacketSummary ( )
protected

◆ HasInstWith()

bool llvm::HexagonShuffler::HasInstWith ( InstPredicate  Pred) const
inline

Definition at line 225 of file HexagonShuffler.h.

References llvm::any_of(), I, insts(), and MCII.

◆ insts() [1/4]

packet_range llvm::HexagonShuffler::insts ( )
inline

◆ insts() [2/4]

const_packet_range llvm::HexagonShuffler::insts ( ) const
inline

Definition at line 221 of file HexagonShuffler.h.

References cbegin(), cend(), and llvm::make_range().

◆ insts() [3/4]

packet_range llvm::HexagonShuffler::insts ( HexagonPacket P)
inline

Definition at line 214 of file HexagonShuffler.h.

References llvm::make_range(), and P.

◆ insts() [4/4]

const_packet_range llvm::HexagonShuffler::insts ( HexagonPacket const P) const
inline

Definition at line 217 of file HexagonShuffler.h.

References llvm::make_range(), and P.

◆ isMemReorderDisabled()

bool llvm::HexagonShuffler::isMemReorderDisabled ( ) const
inline

◆ permitNonSlot()

void HexagonShuffler::permitNonSlot ( )
protected

Definition at line 310 of file HexagonShuffler.cpp.

References insts(), llvm::HexagonMCInstrInfo::requiresSlot(), and STI.

Referenced by applySlotRestrictions().

◆ reportError()

void HexagonShuffler::reportError ( Twine const Msg)

◆ reportResourceError()

void HexagonShuffler::reportResourceError ( HexagonPacketSummary const Summary,
StringRef  Err 
)

Definition at line 705 of file HexagonShuffler.cpp.

Referenced by restrictBranchOrder(), and ValidResourceUsage().

◆ reportResourceUsage()

void HexagonShuffler::reportResourceUsage ( HexagonPacketSummary const Summary)

◆ reset()

void HexagonShuffler::reset ( )

Definition at line 175 of file HexagonShuffler.cpp.

References BundleFlags, CheckFailure, and llvm::SmallVectorImpl< T >::clear().

Referenced by HexagonShuffler().

◆ restrictBranchOrder()

void HexagonShuffler::restrictBranchOrder ( HexagonPacketSummary const Summary)
protected

Definition at line 270 of file HexagonShuffler.cpp.

References reportError(), reportResourceError(), and tryAuction().

Referenced by applySlotRestrictions().

◆ restrictNoSlot1()

void llvm::HexagonShuffler::restrictNoSlot1 ( )
protected

◆ restrictNoSlot1Store()

void HexagonShuffler::restrictNoSlot1Store ( HexagonPacketSummary const Summary)
protected

◆ restrictPreferSlot3()

void HexagonShuffler::restrictPreferSlot3 ( HexagonPacketSummary const Summary,
const bool  DoShuffle 
)
protected

◆ restrictSlot1AOK()

void HexagonShuffler::restrictSlot1AOK ( HexagonPacketSummary const Summary)
protected

◆ restrictStoreLoadOrder()

bool HexagonShuffler::restrictStoreLoadOrder ( HexagonPacketSummary const Summary)
protected

◆ shuffle()

bool HexagonShuffler::shuffle ( )

◆ size()

unsigned llvm::HexagonShuffler::size ( ) const
inline

Definition at line 204 of file HexagonShuffler.h.

Referenced by llvm::HexagonMCShuffle(), and shuffle().

◆ tryAuction()

llvm::Optional< HexagonShuffler::HexagonPacket > HexagonShuffler::tryAuction ( HexagonPacketSummary const Summary)
protected

◆ ValidPacketMemoryOps()

bool HexagonShuffler::ValidPacketMemoryOps ( HexagonPacketSummary const Summary) const
protected

Definition at line 571 of file HexagonShuffler.cpp.

Referenced by check().

◆ ValidResourceUsage()

bool HexagonShuffler::ValidResourceUsage ( HexagonPacketSummary const Summary)
protected

Member Data Documentation

◆ AppliedRestrictions

std::vector<std::pair<SMLoc, std::string> > llvm::HexagonShuffler::AppliedRestrictions
protected

◆ BundleFlags

int64_t llvm::HexagonShuffler::BundleFlags
protected

Definition at line 163 of file HexagonShuffler.h.

Referenced by llvm::HexagonMCShuffler::copyTo(), isMemReorderDisabled(), and reset().

◆ CheckFailure

bool llvm::HexagonShuffler::CheckFailure
protected

Definition at line 168 of file HexagonShuffler.h.

Referenced by applySlotRestrictions(), check(), reportError(), and reset().

◆ Context

MCContext& llvm::HexagonShuffler::Context
protected

Definition at line 162 of file HexagonShuffler.h.

Referenced by reportError(), and reportResourceUsage().

◆ Loc

SMLoc llvm::HexagonShuffler::Loc
protected

Definition at line 166 of file HexagonShuffler.h.

Referenced by llvm::HexagonMCShuffler::copyTo(), and reportError().

◆ MCII

const MCInstrInfo& llvm::HexagonShuffler::MCII
protected

◆ ReportErrors

bool llvm::HexagonShuffler::ReportErrors
protected

Definition at line 167 of file HexagonShuffler.h.

Referenced by reportError().

◆ STI

const MCSubtargetInfo& llvm::HexagonShuffler::STI
protected

Definition at line 165 of file HexagonShuffler.h.

Referenced by append(), GetPacketSummary(), permitNonSlot(), and reportResourceUsage().


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