LLVM  14.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 ()
 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)
 

Protected Member Functions

bool applySlotRestrictions (HexagonPacketSummary const &Summary)
 
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)
 
void permitNonSlot ()
 
Optional< HexagonPackettryAuction (HexagonPacketSummary const &Summary) const
 
HexagonPacketSummary GetPacketSummary ()
 
bool ValidPacketMemoryOps (HexagonPacketSummary const &Summary) const
 
bool ValidResourceUsage (HexagonPacketSummary const &Summary)
 
bool validPacketInsts () const
 

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 142 of file HexagonShuffler.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 198 of file HexagonShuffler.h.

◆ const_packet_range

Definition at line 200 of file HexagonShuffler.h.

◆ InstPredicate

Definition at line 231 of file HexagonShuffler.h.

◆ iterator

Definition at line 197 of file HexagonShuffler.h.

◆ packet_range

Definition at line 199 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 180 of file HexagonShuffler.cpp.

References MCII, S, and STI.

◆ applySlotRestrictions()

bool HexagonShuffler::applySlotRestrictions ( HexagonPacketSummary const Summary)
protected

◆ begin()

iterator llvm::HexagonShuffler::begin ( )
inline

◆ cbegin()

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

Definition at line 220 of file HexagonShuffler.h.

Referenced by insts(), and ValidResourceUsage().

◆ cend()

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

Definition at line 221 of file HexagonShuffler.h.

Referenced by insts(), and ValidResourceUsage().

◆ check()

bool HexagonShuffler::check ( )

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

Definition at line 593 of file HexagonShuffler.cpp.

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

Referenced by shuffle().

◆ end()

iterator llvm::HexagonShuffler::end ( )
inline

◆ GetPacketSummary()

HexagonShuffler::HexagonPacketSummary HexagonShuffler::GetPacketSummary ( )
protected

◆ HasInstWith()

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

Definition at line 233 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 229 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 222 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 225 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)

◆ reset()

void HexagonShuffler::reset ( )

Definition at line 174 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 269 of file HexagonShuffler.cpp.

References reportError(), 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)
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 212 of file HexagonShuffler.h.

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

◆ tryAuction()

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

◆ validPacketInsts()

bool llvm::HexagonShuffler::validPacketInsts ( ) const
protected

◆ ValidPacketMemoryOps()

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

Definition at line 555 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

Definition at line 179 of file HexagonShuffler.h.

Referenced by reportError(), restrictNoSlot1Store(), and restrictSlot1AOK().

◆ BundleFlags

int64_t llvm::HexagonShuffler::BundleFlags
protected

Definition at line 173 of file HexagonShuffler.h.

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

◆ CheckFailure

bool llvm::HexagonShuffler::CheckFailure
protected

Definition at line 178 of file HexagonShuffler.h.

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

◆ Context

MCContext& llvm::HexagonShuffler::Context
protected

Definition at line 172 of file HexagonShuffler.h.

Referenced by reportError().

◆ Loc

SMLoc llvm::HexagonShuffler::Loc
protected

Definition at line 176 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 177 of file HexagonShuffler.h.

Referenced by reportError().

◆ STI

const MCSubtargetInfo& llvm::HexagonShuffler::STI
protected

Definition at line 175 of file HexagonShuffler.h.

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


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