[PSA] ODS generated accessors will change to have a `get` prefix (update you APIs!)

Hey,

We will be adding an option (change, bug) to enable prefixing accessors with get/set and also converting the name in ODS to UpperCamel from snake_case (e.g., what would be my_attribute() today, will be getMyAttribute()). The option will initially be off (no change from today, no prefix generated) and dialects can opt-in to switch to having a prefix or to generate both forms. The dialects in core will be migrated to use this new prefixed form. We expect the migration to go like:

  1. Change prefix emission to _Both of a dialect;
  2. Update all uses to use prefix;
  3. Submit;
  4. Allow users to migrate (~2 weeks);
  5. Flip prefix emission to _Prefixed;

The migration time is short as we expect folks could use automatic approaches (like rewriters 1, 2 ) to update uses.

– Jacques

2 Likes

Thank you so much for driving this Jacques, this will do a lot to improve consistency of the MLIR APIs.

1 Like