Commit Graph

31 Commits

Author SHA1 Message Date
Lauri Vasama 5d3e3f73d9 Add clift.require operation 2026-05-13 15:32:34 +02:00
Lauri Vasama f6d2eaea4b Add Clift DataModelAttr 2026-05-04 10:48:03 +03:00
Lauri Vasama be564f8944 Migrate isIntegerType users to unwrapped_isa 2026-04-30 15:09:16 +03:00
Lauri Vasama 7126513af8 Add CallOp::getFunctionType 2026-04-30 15:09:16 +03:00
Lauri Vasama a338194eb7 Move namespace mlir::clift out of namespace mlir 2026-04-27 12:48:24 +03:00
Lauri Vasama 4cadcafa2c Move operand constraints from C++ to tablegen 2026-04-08 12:30:31 +03:00
Lauri Vasama d35e54627c Add Clift ValueType interface
Value types is the set of non-array object types. These types are
assignable, can be used as function parameters, and as return types
(along with void), and in other scenarios where the type must have usual
value-like behaviour with no weirdness (such as array decay).
2026-04-08 12:28: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 82ae097c18 Improve Clift operation type constraints 2026-04-08 11:12:41 +03:00
Lauri Vasama 4e4d3bab46 Remove namespace mlir using directives 2026-04-08 11:12:41 +03:00
Lauri Vasama de0e59b188 Move FunctionOp arg attr verify to model verify 2026-04-08 11:12:41 +03:00
Ivan Krysak 1f5ca9f40e Clift: ensure _REG and _STACK are exclusive 2026-03-27 08:28:46 +00:00
Andrea Gussoni cbb3f03910 Clift: fix CastKind::Decay verify
Perform `dealias` over argument operand of the `CastOp`.
2026-03-18 17:25:13 +01:00
Lauri Vasama 47f030248c Add ExpressionRegionOpInterface 2026-02-13 08:41:39 +02:00
Lauri Vasama ba945442d6 Add BlockStatementOp 2025-12-05 15:01:14 +02:00
Lauri Vasama d5d1734f5c Add expression usage helpers 2025-11-12 15:28:54 +02:00
Lauri Vasama cee099c2df Rename Clift GoToOp to GotoOp 2025-11-12 15:28:54 +02:00
Lauri Vasama 220439dfce Remove FunctionType::getCliftFunctionType
Change FunctionType::getFunctionType to return clift::FunctionType
instead of clift::ValueType.
2025-11-12 15:28:54 +02:00
Lauri Vasama 68436c58d6 StatementOpInterface::isIndirectlyNoFallthrough 2025-11-12 15:28:54 +02:00
Lauri Vasama 8a1123ad58 Fix MakeLabelOp canonicalization 2025-11-12 15:28:54 +02:00
Lauri Vasama a912df4c06 Fix loop label related issues 2025-11-12 15:28:54 +02:00
Lauri Vasama 02d3c82887 Add support for Clift for-loop initializers 2025-10-21 09:15:40 +02:00
Lauri Vasama bf5adce413 Overhaul Clift loop syntax, add break/continue 2025-10-21 09:15:40 +02:00
Lauri Vasama 7da5792f0a Add Clift label and jump operation interfaces 2025-10-21 09:15:40 +02:00
Lauri Vasama f3be99f317 Use keyword for attr dicts of ops with regions 2025-10-21 09:15:40 +02:00
Lauri Vasama 22d6f70ee2 Clift directory structure overhaul 2025-10-13 15:08:20 +02:00