@@ -393,11 +393,15 @@ class AIEBaseMCFormats {
393393
394394 virtual const PacketFormats &getPacketFormats () const = 0;
395395
396+ virtual ArrayRef<bool > getIsFormatAvailable () const = 0;
397+
396398 // \return all Slots that correspond to the load instructions
397399 virtual SmallVector<MCSlotKind, 2 > getLoadSlotKinds () const {
398400 llvm_unreachable (" Target didn't implement getLoadSlotKinds()" );
399401 }
400402
403+ bool isFormatAvailable (uint64_t SlotSet) const ;
404+
401405protected:
402406 // / Check if the Instruction is indeed into the Tables.
403407 void checkInstructionIsSupported (unsigned int Opcode) const ;
@@ -411,6 +415,7 @@ class AIEMCFormats : public AIEBaseMCFormats {
411415 getFormatDescIndex (unsigned int Opcode) const override ;
412416 const MCSlotInfo *getSlotInfo (const MCSlotKind Kind) const override ;
413417 const MCFormatDesc *getMCFormats () const override ;
418+ ArrayRef<bool > getIsFormatAvailable () const override ;
414419 const PacketFormats &getPacketFormats () const override ;
415420};
416421
@@ -423,6 +428,7 @@ class AIE2MCFormats : public AIEBaseMCFormats {
423428 const MCSlotInfo *getSlotInfo (const MCSlotKind Kind) const override ;
424429 const MCFormatDesc *getMCFormats () const override ;
425430 const PacketFormats &getPacketFormats () const override ;
431+ ArrayRef<bool > getIsFormatAvailable () const override ;
426432 SmallVector<MCSlotKind, 2 > getLoadSlotKinds () const override ;
427433};
428434
@@ -435,6 +441,7 @@ class AIE2PMCFormats : public AIEBaseMCFormats {
435441 const MCSlotInfo *getSlotInfo (const MCSlotKind Kind) const override ;
436442 const MCFormatDesc *getMCFormats () const override ;
437443 const PacketFormats &getPacketFormats () const override ;
444+ ArrayRef<bool > getIsFormatAvailable () const override ;
438445 SmallVector<MCSlotKind, 2 > getLoadSlotKinds () const override ;
439446};
440447
0 commit comments