Commit Graph

12 Commits

Author SHA1 Message Date
Lauri Vasama 8085a1e8e9 Improve integer literal emission 2026-04-08 12:31:45 +03:00
Lauri Vasama 80731d1a10 Migrate users to new Clift type casts 2026-04-08 12:27:32 +03:00
Lauri Vasama 29c935ac90 Replace Clift type category helpers with casts 2026-04-08 12:25:04 +03:00
Lauri Vasama 9ba90e9b81 Replace ValueType with mlir::Type where applicable
`mlir::Type` is now used as the default C++ type for representing all
MLIR types, even when `ValueType` would be a valid constraint, unless
doing so provides a clear benefit in that specific context.
2026-04-08 12:20:00 +03:00
Lauri Vasama f9a4cb6384 Split up clift::dealias
* `unwrapTypedefs` matches `dealias(T, /*IgnoreQualifiers=*/true)`.
* `collapseTypedefs` matches `dealias(T)`.
2026-04-08 12:18:42 +03:00
Lauri Vasama be8351a17d Split up Clift PrimitiveType
* PrimitiveType is now an interface.
* VoidKind is now VoidType.
* FloatKind is now FloatType.
* The integer kinds are now IntegerType with IntegerKind.
2026-04-08 12:18:10 +03:00
Lauri Vasama a2be1b476a Split up Clift CastOp
* DecayOp - array or function to pointer decay. Not shown in C.
* BitCastOp - bit-preserving conversion. Emitted as bit_cast if
  necessary.
* ExtendOp - zero- or sign-extending conversion from any integer type to
  any wider integer type.
* TruncateOp - truncating conversion from any integer type to any
  narrower integer type.
* PtrResizeOp - resizes a pointer without changing its pointee type.
2026-04-08 12:11:54 +03:00
Lauri Vasama 332fe51aa0 Fix pointer arithmetic legalization
Resizes the integer types involved in pointer arithmetic along with the
pointer types.
2025-12-05 15:01:14 +02:00
Lauri Vasama b43df10c4b Improve Clift legalization
Casts are no longer emitted for immediates in boolean-tested contexts.
2025-12-05 15:01:14 +02:00
Lauri Vasama b24f61db40 Improve legalization
Legalization now emits fewer casts depending on context.
2025-11-12 15:28:54 +02:00
Lauri Vasama 7980e57fb5 Add Clift C legalization pass 2025-10-21 09:15:40 +02:00
Lauri Vasama 22d6f70ee2 Clift directory structure overhaul 2025-10-13 15:08:20 +02:00