LLVM
8.0.1
|
#include "Target/Hexagon/MCTargetDesc/HexagonShuffler.h"
Public Types | |
using | iterator = HexagonPacket::iterator |
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 () |
void | append (MCInst const &ID, MCInst const *Extender, unsigned S) |
void | reportError (Twine const &Msg) |
Protected Member Functions | |
void | applySlotRestrictions () |
void | restrictSlot1AOK () |
void | restrictNoSlot1Store () |
Protected Attributes | |
MCContext & | Context |
int64_t | BundleFlags |
MCInstrInfo const & | MCII |
MCSubtargetInfo const & | STI |
SMLoc | Loc |
bool | ReportErrors |
std::vector< std::pair< SMLoc, std::string > > | AppliedRestrictions |
Definition at line 140 of file HexagonShuffler.h.
Definition at line 163 of file HexagonShuffler.h.
HexagonShuffler::HexagonShuffler | ( | MCContext & | Context, |
bool | ReportErrors, | ||
MCInstrInfo const & | MCII, | ||
MCSubtargetInfo const & | STI | ||
) |
Definition at line 200 of file HexagonShuffler.cpp.
References llvm::MCSubtargetInfo::getCPU(), reset(), and llvm::HexagonCVIResource::SetupTUL().
Definition at line 213 of file HexagonShuffler.cpp.
References MCII, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
protected |
Definition at line 288 of file HexagonShuffler.cpp.
References restrictNoSlot1Store(), and restrictSlot1AOK().
Referenced by check().
|
inline |
Definition at line 181 of file HexagonShuffler.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
Referenced by check(), llvm::HexagonMCShuffler::copyTo(), restrictNoSlot1Store(), restrictSlot1AOK(), and shuffle().
bool HexagonShuffler::check | ( | ) |
Check that the packet is legal and enforce relative insn order.
Definition at line 294 of file HexagonShuffler.cpp.
References applySlotRestrictions(), assert(), begin(), checkHVXPipes(), llvm::SmallVectorImpl< T >::clear(), end(), first, llvm::HexagonMCInstrInfo::getDesc(), llvm::MCOperand::getInst(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), llvm::HexagonMCInstrInfo::getOtherReservedSlots(), llvm::HexagonMCInstrInfo::getType(), I, isBranch(), isMemReorderDisabled(), llvm::MCInstrDesc::isReturn(), jumpSlots, CVIUnits::Lanes, llvm::HexagonInstr::lessCore(), llvm::HexagonInstr::lessCVI(), LLVM_FALLTHROUGH, MAX_JUMP_SLOTS, llvm::MCInstrDesc::mayLoad(), llvm::MCInstrDesc::mayStore(), MCII, llvm::HexagonMCInstrInfo::prefersSlot3(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), reportError(), second, llvm::SmallVectorBase::size(), STI, stores, llvm::HexagonII::TypeALU64, llvm::HexagonII::TypeCJ, llvm::HexagonII::TypeCR, llvm::HexagonII::TypeCVI_GATHER, 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, llvm::HexagonII::TypeV4LDST, and CVIUnits::Units.
Referenced by llvm::HexagonMCChecker::reportBranchErrors(), and shuffle().
|
inline |
Definition at line 182 of file HexagonShuffler.h.
References llvm::sys::path::append(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and reportError().
Referenced by check(), llvm::HexagonMCShuffler::copyTo(), restrictNoSlot1Store(), restrictSlot1AOK(), and shuffle().
|
inline |
Definition at line 177 of file HexagonShuffler.h.
References llvm::HexagonMCInstrInfo::memReorderDisabledMask.
Referenced by check().
Definition at line 670 of file HexagonShuffler.cpp.
References AppliedRestrictions, Context, llvm::SourceMgr::DK_Note, llvm::MCContext::getSourceManager(), I, Loc, llvm::SourceMgr::PrintMessage(), llvm::MCContext::reportError(), and ReportErrors.
void HexagonShuffler::reset | ( | ) |
Definition at line 208 of file HexagonShuffler.cpp.
References BundleFlags, and llvm::SmallVectorImpl< T >::clear().
Referenced by HexagonShuffler().
|
protected |
Definition at line 257 of file HexagonShuffler.cpp.
References AppliedRestrictions, begin(), end(), llvm::HexagonMCInstrInfo::getDesc(), llvm::MCInst::getLoc(), llvm::HexagonMCInstrInfo::isRestrictNoSlot1Store(), and MCII.
Referenced by applySlotRestrictions().
|
protected |
Definition at line 226 of file HexagonShuffler.cpp.
References AppliedRestrictions, begin(), end(), llvm::MCInst::getLoc(), llvm::HexagonMCInstrInfo::getType(), llvm::HexagonMCInstrInfo::isRestrictSlot1AOK(), MCII, llvm::HexagonII::TypeALU32_2op, llvm::HexagonII::TypeALU32_3op, and llvm::HexagonII::TypeALU32_ADDI.
Referenced by applySlotRestrictions().
bool HexagonShuffler::shuffle | ( | ) |
Definition at line 621 of file HexagonShuffler.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), begin(), check(), llvm::dbgs(), llvm::SmallVectorTemplateCommon< T, typename >::end(), end(), llvm::HexagonMCInstrInfo::getDesc(), getOpcode(), HEXAGON_PACKET_SIZE, LLVM_DEBUG, MCII, reportError(), size(), and llvm::raw_ostream::write_hex().
Referenced by llvm::HexagonMCShuffler::reshuffleTo().
|
inline |
Definition at line 175 of file HexagonShuffler.h.
References llvm::SmallVectorBase::size().
Referenced by llvm::HexagonMCShuffle(), and shuffle().
|
protected |
Definition at line 157 of file HexagonShuffler.h.
Referenced by reportError(), restrictNoSlot1Store(), and restrictSlot1AOK().
|
protected |
Definition at line 152 of file HexagonShuffler.h.
Referenced by llvm::HexagonMCShuffler::copyTo(), and reset().
|
protected |
Definition at line 151 of file HexagonShuffler.h.
Referenced by llvm::HexagonMCShuffler::HexagonMCShuffler(), and reportError().
|
protected |
Definition at line 155 of file HexagonShuffler.h.
Referenced by llvm::HexagonMCShuffler::copyTo(), and reportError().
|
protected |
Definition at line 153 of file HexagonShuffler.h.
Referenced by append(), check(), llvm::HexagonMCShuffler::HexagonMCShuffler(), restrictNoSlot1Store(), restrictSlot1AOK(), and shuffle().
|
protected |
Definition at line 156 of file HexagonShuffler.h.
Referenced by reportError().
|
protected |
Definition at line 154 of file HexagonShuffler.h.
Referenced by check(), and llvm::HexagonMCShuffler::HexagonMCShuffler().