@@ -389,11 +389,15 @@ class AIEBaseMCFormats {
389389
390390 virtual const PacketFormats &getPacketFormats () const = 0;
391391
392+ virtual ArrayRef<bool > getIsFormatAvailable () const = 0;
393+
392394 // \return all Slots that correspond to the load instructions
393395 virtual SmallVector<MCSlotKind, 2 > getLoadSlotKinds () const {
394396 llvm_unreachable (" Target didn't implement getLoadSlotKinds()" );
395397 }
396398
399+ bool isFormatAvailable (uint64_t SlotSet) const ;
400+
397401protected:
398402 // / Check if the Instruction is indeed into the Tables.
399403 void checkInstructionIsSupported (unsigned int Opcode) const ;
@@ -407,6 +411,7 @@ class AIEMCFormats : public AIEBaseMCFormats {
407411 getFormatDescIndex (unsigned int Opcode) const override ;
408412 const MCSlotInfo *getSlotInfo (const MCSlotKind Kind) const override ;
409413 const MCFormatDesc *getMCFormats () const override ;
414+ ArrayRef<bool > getIsFormatAvailable () const override ;
410415 const PacketFormats &getPacketFormats () const override ;
411416};
412417
@@ -419,6 +424,7 @@ class AIE2MCFormats : public AIEBaseMCFormats {
419424 const MCSlotInfo *getSlotInfo (const MCSlotKind Kind) const override ;
420425 const MCFormatDesc *getMCFormats () const override ;
421426 const PacketFormats &getPacketFormats () const override ;
427+ ArrayRef<bool > getIsFormatAvailable () const override ;
422428 SmallVector<MCSlotKind, 2 > getLoadSlotKinds () const override ;
423429};
424430
@@ -431,6 +437,7 @@ class AIE2PMCFormats : public AIEBaseMCFormats {
431437 const MCSlotInfo *getSlotInfo (const MCSlotKind Kind) const override ;
432438 const MCFormatDesc *getMCFormats () const override ;
433439 const PacketFormats &getPacketFormats () const override ;
440+ ArrayRef<bool > getIsFormatAvailable () const override ;
434441 SmallVector<MCSlotKind, 2 > getLoadSlotKinds () const override ;
435442};
436443
0 commit comments