How to detect in TableGen whether a register class is a union of other register classes?

Given a register class in TableGen (in other words, we have a *Record), is it possible to detect whether the register class is a union of other register classes? I thought of retrieving the corresponding CodeGenRegisterClass and using getSubClasses() but it doesn’t seem to give me what I want, so then I thought that maybe I can use the MemberList field from the record, but that would involve parsing “add” and “sequence”. It’s doable, but if there’s a simpler way I’d rather do that.

Best regards,

Gabriel Hjort Åkerlund