Commit Graph

38 Commits

Author SHA1 Message Date
Lauri Vasama afaff540ed Implement Clift local variable self-assignment
Local variable initializer regions can now have a block argument
representing the local variable being initialized.
2026-05-25 09:00:41 +02:00
Lauri Vasama 3064653e37 Add StatementOpInterface::getBlockArgumentVariable
Translates a mlir::BlockArgument to an mlir::Value more directly
representing the entity or expression to which the block argument
refers, or null if not applicable for the statement in question.
2026-05-25 09:00:41 +02:00
Lauri Vasama 5d3e3f73d9 Add clift.require operation 2026-05-13 15:32:34 +02: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 80731d1a10 Migrate users to new Clift type casts 2026-04-08 12:27:32 +03:00
Lauri Vasama fb3cdbdf38 Rename ValueType to AddressableType 2026-04-08 12:26:18 +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 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 03c9b2288f Simplify Clift expression op definitions 2026-04-08 11:12:41 +03:00
Lauri Vasama fae3bb5788 Remove unnecessary Clift operand type constraints 2026-04-08 11:12:41 +03:00
Lauri Vasama 7b25803333 Remove unused BasicStatementOp default argument 2026-04-08 11:12:41 +03:00
Lauri Vasama dda0ef6292 Remove unused Clift_AnyLabelType constraint 2026-04-08 11:12:41 +03:00
Ivan Krysak e34fbcb955 FunctionOp: add noreturn and always_inline 2026-03-27 08:08:08 +00:00
Lauri Vasama ad6f6df04e Improve function arg/result attribute interface 2026-03-27 07:18:49 +00:00
Lauri Vasama 811478771e Make local op name attributes inherent
The handle was already inherent, but was not being used. Discardable
attributes were instead previously used for both handle and name.
2026-02-13 08:41:39 +02:00
Lauri Vasama 47f030248c Add ExpressionRegionOpInterface 2026-02-13 08:41:39 +02:00
Lauri Vasama ba9c756d07 Improve StatementRegionOpInterface 2026-02-13 08:41:39 +02:00
Lauri Vasama ba945442d6 Add BlockStatementOp 2025-12-05 15:01:14 +02:00
Lauri Vasama 8599cc0c1d Add StatementRegionOpInterface
This interface describes any operation containing statement regions.
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 c09862516d Make Clift operations commutative 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 16589c935c Add BranchOpInterface for if and switch 2025-10-21 09:15:40 +02:00
Lauri Vasama 3d9df0f50d Add then marker for Clift if-statement assembly 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