File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -91,10 +91,15 @@ template <class I> class Bundle {
9191 // Verify there is a format that can accommodate the new slots
9292 MCSlotKind Slot = FormatInterface->getSlotKind (InstOpCode);
9393 assert (Slot != MCSlotKind ());
94- SlotBits NewSlots = FormatInterface->getSlotInfo (Slot)->getSlotSet ();
95- return (OccupiedSlots & NewSlots) == 0 &&
96- FormatInterface->getPacketFormats ().getFormat (OccupiedSlots |
97- NewSlots);
94+
95+ auto *SlotInfo = FormatInterface->getSlotInfo (Slot);
96+ // ConflictBits is a fast predictor of missing formats
97+ SlotBits ConflictBits = SlotInfo->getConflictSet ();
98+ if (OccupiedSlots & ConflictBits) {
99+ return false ;
100+ }
101+ SlotBits NewSlots = OccupiedSlots | SlotInfo->getSlotSet ();
102+ return FormatInterface->getPacketFormats ().getFormat (NewSlots);
98103 }
99104
100105 // / Add an instruction to the bundle
You can’t perform that action at this time.
0 commit comments