Page MenuHomePhabricator

[DFAPacketizer] Allow up to 64 functional units

Authored by jmolloy on Oct 17 2019, 7:19 AM.



To drive the automaton we used a uint64_t as an action type. This
contained the transition's resource requirements as a conjunction:

(a OR b) AND (b OR c)

We encoded this conjunction as a sequence of four 16-bit bitmasks.
This limited the number of addressable functional units to 16, which
is quite low and has bitten many people in the past.

Instead, the DFAEmitter now generates a lookup table from InstrItinerary
class (index of the ItinData inside the ProcItineraries) to an internal
action index which is essentially a dense embedding of the conjunctive
form. Because we never materialize the conjunctive form, we no longer
have the 16 FU restriction.

In this patch we limit to 64 functional units due to using a uint64_t
bitmask in the DFAEmitter. Now that we've decoupled these representations
we can increase this in future.

Diff Detail

Event Timeline

jmolloy created this revision.Oct 17 2019, 7:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2019, 7:19 AM
majnemer added inline comments.Oct 17 2019, 10:24 AM

Maybe use ArrayRef here?


Should this be std::deque<NfaStateTy> ?




Should this be NfaStateTy Resources : InsnClass ?

jmolloy marked 4 inline comments as done.Oct 18 2019, 1:52 AM

Thanks David!

jmolloy updated this revision to Diff 225574.Oct 18 2019, 1:53 AM

Updated based on David's comments.

ThomasRaoux accepted this revision.Oct 31 2019, 10:23 AM

Looks good to me.

This revision is now accepted and ready to land.Oct 31 2019, 10:23 AM
This revision was automatically updated to reflect the committed changes.