14#ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONSHUFFLER_H
15#define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONSHUFFLER_H
40 unsigned Slots, Weight;
65 return (
A.getWeight() <
B.getWeight());
82 void setLanes(
unsigned l) { Lanes = l; }
83 void setLoad(
bool f =
true) { Load = f; }
84 void setStore(
bool f =
true) { Store = f; }
88 MCSubtargetInfo
const &STI,
89 unsigned s, MCInst
const *
id);
109 MCInst const *Extender,
unsigned s)
110 :
ID(id), Extender(Extender), Core(s), CVI(MCII, STI, s, id){};
136 struct HexagonPacketSummary {
145 unsigned NonZCVIloads;
146 unsigned AllCVIloads;
151 std::optional<HexagonInstr *> PrefSlot3Inst;
153 unsigned ReservedSlotMask;
155 std::optional<SMLoc> Slot1AOKLoc;
156 std::optional<SMLoc> NoSlot1StoreLoc;
172 const bool DoShuffle);
179 const bool DoShuffle);
182 std::optional<HexagonPacket>
tryAuction(HexagonPacketSummary
const &Summary);
200 bool check(
const bool RequireShuffle =
true);
227 MCInst const &Inst =
I.getDesc();
228 return (*Pred)(
MCII, Inst);
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define HEXAGON_PACKET_SIZE
This file defines the SmallVector class.
HexagonCVIResource(MCInstrInfo const &MCII, MCSubtargetInfo const &STI, unsigned s, MCInst const *id)
unsigned getLanes() const
std::pair< unsigned, unsigned > UnitsAndLanes
MCInst const * getExtender() const
MCInst const & getDesc() const
bool operator<(const HexagonInstr &B) const
static bool lessCore(const HexagonInstr &A, const HexagonInstr &B)
static bool lessCVI(const HexagonInstr &A, const HexagonInstr &B)
HexagonInstr(MCInstrInfo const &MCII, MCSubtargetInfo const &STI, MCInst const *id, MCInst const *Extender, unsigned s)
unsigned setWeight(unsigned s)
unsigned getUnits() const
HexagonResource(unsigned s)
unsigned getWeight() const
static bool lessWeight(const HexagonResource &A, const HexagonResource &B)
void setUnits(unsigned s)
static bool lessUnits(const HexagonResource &A, const HexagonResource &B)
const_iterator cbegin() const
packet_range insts(HexagonPacket &P)
bool(*)(MCInstrInfo const &, MCInst const &) InstPredicate
bool isMemReorderDisabled() const
void restrictNoSlot1Store(HexagonPacketSummary const &Summary)
bool check(const bool RequireShuffle=true)
Check that the packet is legal and enforce relative insn order.
void restrictSlot1AOK(HexagonPacketSummary const &Summary)
const_packet_range insts(HexagonPacket const &P) const
bool restrictStoreLoadOrder(HexagonPacketSummary const &Summary)
void reportError(Twine const &Msg)
void reportResourceError(HexagonPacketSummary const &Summary, StringRef Err)
HexagonPacketSummary GetPacketSummary()
bool ValidResourceUsage(HexagonPacketSummary const &Summary)
const_iterator cend() const
MCSubtargetInfo const & STI
void restrictBranchOrder(HexagonPacketSummary const &Summary)
const_packet_range insts() const
void append(MCInst const &ID, MCInst const *Extender, unsigned S)
bool applySlotRestrictions(HexagonPacketSummary const &Summary, const bool DoShuffle)
void reportResourceUsage(HexagonPacketSummary const &Summary)
bool ValidPacketMemoryOps(HexagonPacketSummary const &Summary) const
void restrictPreferSlot3(HexagonPacketSummary const &Summary, const bool DoShuffle)
bool HasInstWith(InstPredicate Pred) const
std::vector< std::pair< SMLoc, std::string > > AppliedRestrictions
std::optional< HexagonPacket > tryAuction(HexagonPacketSummary const &Summary)
Context object for machine code objects.
Instances of this class represent a single low-level machine instruction.
Interface to description of machine instruction set.
Generic base class for all target subtargets.
Represents a location in source code.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
A range adaptor for a pair of iterators.
constexpr int64_t memReorderDisabledMask
This is an optimization pass for GlobalISel generic memory operations.
int popcount(T Value) noexcept
Count the number of set bits in a value.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.