logo raviqqe's logbook

Making the ODS-generated dialects the default in Melior

Summary

Method

Blockers

B-1. 179 builders demand result types that MLIR can infer

B-2. Half of all attribute parameters are an untyped Attribute

B-3. The non-op parts of llvm have nowhere to go

B-4. Same names with different signatures leave no migration path

High-impact ergonomics

E-1. A typed operation is lost once it is in a block

E-2. Optional fields cannot be set conditionally

E-3. Variadic-of-variadic operands are flattened

E-4. Properties are silently dropped

E-5. Fields named name become _name

E-6. No way to add discardable attributes

Open generator defects

All of these were checked against the code at the version above.

Cost and packaging

Already at parity

Suggested order

  1. B-1 (inference), B-2 together with E-5 (typed attributes and naming), and D-1 to D-3. These are generator work with no API break.
  2. E-1, E-2, E-3, and E-6 (ergonomics), with E-4 (properties) folded into the attribute work.
  3. B-3: decide whether the non-op llvm items stay hand-written or get generated.
  4. B-4, C-2, and C-3: deprecate the hand-written functions, port the tests, the README, and helpers, and then make ods-dialects a default feature.