LLVM 22.0.0git
llvm::HexagonShuffler Class Reference

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

Inheritance diagram for llvm::HexagonShuffler:
[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.
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 ()
std::optional< HexagonPackettryAuction (HexagonPacketSummary const &Summary)
HexagonPacketSummary GetPacketSummary ()
bool ValidPacketMemoryOps (HexagonPacketSummary const &Summary) const
bool ValidResourceUsage (HexagonPacketSummary const &Summary)

Protected Attributes

MCContextContext
int64_t BundleFlags
MCInstrInfo constMCII
MCSubtargetInfo constSTI
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

◆ const_packet_range

◆ InstPredicate

◆ iterator

◆ packet_range

Constructor & Destructor Documentation

◆ HexagonShuffler()

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

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, 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()

◆ 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]

◆ 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()

◆ reportResourceError()

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

Definition at line 705 of file HexagonShuffler.cpp.

References reportError(), ReportErrors, and reportResourceUsage().

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, and CheckFailure.

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()

◆ size()

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

Definition at line 204 of file HexagonShuffler.h.

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

◆ tryAuction()

std::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()

Member Data Documentation

◆ AppliedRestrictions

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

◆ BundleFlags

int64_t llvm::HexagonShuffler::BundleFlags
protected

◆ CheckFailure

bool llvm::HexagonShuffler::CheckFailure
protected

Definition at line 168 of file HexagonShuffler.h.

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

◆ Context

◆ Loc

SMLoc llvm::HexagonShuffler::Loc
protected

Definition at line 166 of file HexagonShuffler.h.

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

◆ MCII

◆ ReportErrors

◆ STI


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