PSA: Planned changes to TableGen `getAllDerivedDefinitions` API (potential downstream breakages)

I am planning to change getAllDerivedDefinitions family of functions in TableGen RecordKeeper class to be const, and their return values to return vector/ArrayRef of const Record *. Please see this PR and a previous post about this.

Downstream backends may break due to this change if they use const RecordKeeper. The immediate fix is simple for now, change the backend to use a non-const reference. The non-const overloads of this API are being retained for staged migration to new API.

Following this MR, I’ll change all upstream backends to use the const versions of the API. After that, we plan to deprecate the non-const versions (immediately) and then delete them (timelines for deletion can be discussed below, but I am thinking in 2-3 weeks after the upstream migration). Downstream backends could potentially start work on migration to const version of the API as soon as the MR lands.

Please let me know if there are any concerns and if you maintain a downstream backend that might be affected, please suggest a suitable timeline to delete the deprecated API.

Thanks
Rahul

1 Like