LLVM: llvm::HexagonShuffler Class Reference (original) (raw)

#include "[Target/Hexagon/MCTargetDesc/HexagonShuffler.h](HexagonShuffler%5F8h%5Fsource.html)"

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< HexagonPacket > tryAuction (HexagonPacketSummary const &Summary)
HexagonPacketSummary GetPacketSummary ()
bool ValidPacketMemoryOps (HexagonPacketSummary const &Summary) const
bool ValidResourceUsage (HexagonPacketSummary const &Summary)
Protected Attributes
MCContext & Context
int64_t BundleFlags
MCInstrInfo const & MCII
MCSubtargetInfo const & STI
SMLoc Loc
bool ReportErrors
bool CheckFailure
std::vector< std::pair< SMLoc, std::string > > AppliedRestrictions

Definition at line 132 of file HexagonShuffler.h.

const_iterator

const_packet_range

InstPredicate

iterator

packet_range

append()

applySlotRestrictions()

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

begin()

iterator llvm::HexagonShuffler::begin ( ) inline

cbegin()

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

cend()

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

check()

end()

iterator llvm::HexagonShuffler::end ( ) inline

GetPacketSummary()

HexagonShuffler::HexagonPacketSummary HexagonShuffler::GetPacketSummary ( ) protected

Definition at line 451 of file HexagonShuffler.cpp.

References AppliedRestrictions, assert(), begin(), end(), llvm::HexagonMCInstrInfo::getDesc(), llvm::HexagonMCInstrInfo::getOtherReservedSlots(), llvm::HexagonMCInstrInfo::getType(), llvm::HexagonMCInstrInfo::IsABranchingInst(), isBranch(), llvm::HexagonMCInstrInfo::isRestrictNoSlot1Store(), llvm::HexagonMCInstrInfo::isRestrictSlot1AOK(), MCII, llvm::HexagonMCInstrInfo::prefersSlot3(), SlotMaskToText(), slotSingleLoad, slotSingleStore, STI, llvm::HexagonII::TypeALU64, llvm::HexagonII::TypeCJ, llvm::HexagonII::TypeCR, llvm::HexagonII::TypeCVI_GATHER, llvm::HexagonII::TypeCVI_GATHER_DV, llvm::HexagonII::TypeCVI_GATHER_RST, llvm::HexagonII::TypeCVI_SCATTER, llvm::HexagonII::TypeCVI_SCATTER_DV, llvm::HexagonII::TypeCVI_SCATTER_NEW_RST, llvm::HexagonII::TypeCVI_SCATTER_NEW_ST, llvm::HexagonII::TypeCVI_SCATTER_RST, llvm::HexagonII::TypeCVI_VM_LD, llvm::HexagonII::TypeCVI_VM_NEW_ST, llvm::HexagonII::TypeCVI_VM_ST, llvm::HexagonII::TypeCVI_VM_STU, llvm::HexagonII::TypeCVI_VM_TMP_LD, llvm::HexagonII::TypeCVI_VM_VP_LDU, llvm::HexagonII::TypeCVI_ZW, llvm::HexagonII::TypeDUPLEX, llvm::HexagonII::TypeJ, llvm::HexagonII::TypeLD, llvm::HexagonII::TypeNCJ, llvm::HexagonII::TypeS_2op, llvm::HexagonII::TypeS_3op, llvm::HexagonII::TypeST, llvm::HexagonII::TypeV2LDST, and llvm::HexagonII::TypeV4LDST.

Referenced by check().

HasInstWith()

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

insts() [1/4]

packet_range llvm::HexagonShuffler::insts ( ) inline

Definition at line 220 of file HexagonShuffler.h.

References begin(), end(), and llvm::make_range().

Referenced by HasInstWith(), permitNonSlot(), reportResourceUsage(), restrictNoSlot1Store(), restrictPreferSlot3(), restrictSlot1AOK(), restrictStoreLoadOrder(), shuffle(), and tryAuction().

insts() [2/4]

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

insts() [3/4]

insts() [4/4]

isMemReorderDisabled()

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

permitNonSlot()

void HexagonShuffler::permitNonSlot ( ) protected

reportError()

void HexagonShuffler::reportError ( Twine const & Msg )

Definition at line 731 of file HexagonShuffler.cpp.

References AppliedRestrictions, CheckFailure, Context, llvm::SourceMgr::DK_Note, I, Loc, and ReportErrors.

Referenced by check(), reportResourceError(), restrictBranchOrder(), restrictStoreLoadOrder(), shuffle(), and ValidResourceUsage().

reportResourceError()

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

reportResourceUsage()

void HexagonShuffler::reportResourceUsage ( HexagonPacketSummary const & Summary )

reset()

void HexagonShuffler::reset ( )

restrictBranchOrder()

void HexagonShuffler::restrictBranchOrder ( HexagonPacketSummary const & Summary) protected

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

Definition at line 356 of file HexagonShuffler.cpp.

References begin(), end(), llvm::HexagonMCInstrInfo::getDesc(), I, insts(), isMemReorderDisabled(), MCII, llvm::none_of(), reportError(), Slot0Mask, Slot1Mask, slotSingleLoad, and slotSingleStore.

Referenced by applySlotRestrictions().

shuffle()

bool HexagonShuffler::shuffle ( )

Definition at line 652 of file HexagonShuffler.cpp.

References check(), llvm::dbgs(), llvm::HexagonMCInstrInfo::getDesc(), llvm::MCInstrDesc::getOpcode(), HEXAGON_PACKET_SIZE, insts(), LLVM_DEBUG, MCII, reportError(), size(), and llvm::raw_ostream::write_hex().

Referenced by llvm::HexagonMCShuffler::reshuffleTo().

size()

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

tryAuction()

Definition at line 627 of file HexagonShuffler.cpp.

References llvm::all_of(), llvm::dbgs(), llvm::format_hex(), llvm::HexagonMCInstrInfo::getName(), I, insts(), llvm::HexagonInstr::lessCore(), LLVM_DEBUG, MCII, and llvm::stable_sort().

Referenced by restrictBranchOrder(), restrictPreferSlot3(), and ValidResourceUsage().

ValidPacketMemoryOps()

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

ValidResourceUsage()

bool HexagonShuffler::ValidResourceUsage ( HexagonPacketSummary const & Summary) protected

Definition at line 318 of file HexagonShuffler.cpp.

References checkHVXPipes(), llvm::SmallVectorImpl< T >::clear(), I, CVIUnits::Lanes, llvm::HexagonInstr::lessCVI(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), reportError(), reportResourceError(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::stable_sort(), tryAuction(), and CVIUnits::Units.

Referenced by check().

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

Context

Loc

SMLoc llvm::HexagonShuffler::Loc protected

MCII

Definition at line 164 of file HexagonShuffler.h.

Referenced by append(), GetPacketSummary(), HasInstWith(), llvm::HexagonMCShuffler::HexagonMCShuffler(), llvm::HexagonMCShuffler::HexagonMCShuffler(), HexagonShuffler(), restrictNoSlot1Store(), restrictSlot1AOK(), restrictStoreLoadOrder(), shuffle(), and tryAuction().

ReportErrors

bool llvm::HexagonShuffler::ReportErrors protected

STI


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