Commit Graph

48 Commits

Author SHA1 Message Date
Lauri Vasama e9c329e51d Rename Clift unique handle to handle 2025-03-24 09:26:43 +02:00
Lauri Vasama 1325c75979 Move Clift op custom parsers out of header 2025-03-24 09:26:43 +02:00
Lauri Vasama c85275cc70 Add expression region utilities in CliftOps.h 2025-03-24 09:26:43 +02:00
Lauri Vasama 5f475739ef Rename reinterpret, add convert cast 2025-03-24 09:26:43 +02:00
Lauri Vasama e2f4af30e9 Add custom builder for Clift FunctionOp 2025-03-24 09:26:43 +02:00
Lauri Vasama 23b47f825e Add Clift AggregateOp 2025-03-24 09:17:38 +02:00
Lauri Vasama bf625c631a Improve Clift CallOp syntax 2025-03-24 09:17:36 +02:00
Lauri Vasama 1b63797640 Add Clift TernaryOp 2025-03-19 12:57:22 +02:00
Lauri Vasama 747a792f0f Add Clift pointer arithmetic ops 2025-03-19 12:57:22 +02:00
Lauri Vasama 66246218b7 Add Clift StringOp 2025-03-19 12:57:21 +02:00
Lauri Vasama 888d529d93 Fix Clift return type verification 2025-03-19 12:57:20 +02:00
Lauri Vasama df2003efb8 Add clift::removeConst in CliftTypes.h 2025-03-19 12:57:20 +02:00
Lauri Vasama 4a334bef7b Move Clift type helpers to CliftTypes.h 2025-03-19 12:57:19 +02:00
Lauri Vasama eec882dac1 Add clift::GlobalOpInterface 2025-03-19 12:57:19 +02:00
Lauri Vasama 386efffb2f Convert TypeDefinitionAttr ID to UniqueHandle 2025-03-19 12:57:17 +02:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Lauri Vasama 06d91d485d Factor visitation out of ModuleOp verify 2025-01-30 14:52:47 +02:00
Lauri Vasama aaddafa15b Add check for conflicting local names in Clift 2025-01-10 08:03:20 +02:00
Lauri Vasama 4cedc22efb Merge access ops into AccessOp with indirect flag 2025-01-02 11:25:32 +02:00
Lauri Vasama 9f6003f1f4 Add SwitchOp::getConditionType 2025-01-02 11:25:32 +02:00
Lauri Vasama fe2e70e885 Improve label and goto ops 2025-01-02 11:25:32 +02:00
Lauri Vasama da8e581861 Loosen LocalVariableOp verification 2025-01-02 11:25:32 +02:00
Lauri Vasama 3b8e9dc3bb Loosen YieldOp verification
Yield is not return. There is no need to verify the types being yielded.
f; is a valid expression statement, even when f is a function. In this
case a function is yielded, but that is fine.
2025-01-02 11:25:32 +02:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Lauri Vasama 2d2fe890fb Add Clift expression operations 2024-10-31 08:41:25 +01:00
Lauri Vasama 4338607257 Add Clift operand type parser 2024-10-31 08:41:25 +01:00
Lauri Vasama eb20e745a3 Add Clift op type constraints 2024-10-31 08:41:25 +01:00
Lauri Vasama ecf4869473 Move CliftTypeHelpers.h functions to CliftType.h
Also added some new type functions.
2024-10-31 08:41:25 +01:00
Lauri Vasama e1b55fd5c3 Add custom assembly format for Clift FunctionOp 2024-10-31 08:41:25 +01:00
Lauri Vasama 6062d4a863 Fix YieldOp::verify message 2024-10-31 08:41:25 +01:00
Alessandro Di Federico 8706fd8459 Initialize pointers to nullptr 2024-09-27 10:35:10 +02:00
Lauri Vasama c821fd0455 Remove Clift FunctionArgumentAttr
The FunctionArgumentAttr was removed in order to better conform to the
builtin FunctionOpInterface. The FunctionOpInterface exposes the
argument and result types as array attributes of mlir::Type, and this
was difficult when each argument was wrapped in a FunctionArgumentAttr.

Debug names of the function types arguments from the model is currently
lost in the conversion to MLIR, but when the conversion for functions
themselves is implemented, the names can be added to the function
operations as argument attributes.
2024-09-04 10:58:02 +02:00
Lauri Vasama 10d878e5ac Add verification of control statement nesting 2024-09-04 10:58:02 +02:00
Lauri Vasama 8f98664fc0 Add verification of Clift module level operations 2024-09-04 10:58:02 +02:00
Lauri Vasama 43399c0462 Add minimal Clift expression operations 2024-09-04 10:58:02 +02:00
Lauri Vasama 9295451b5a Add Clift loop statement operations 2024-09-04 10:58:02 +02:00
Lauri Vasama e8f558cc55 Add custom parser for SwitchOp 2024-09-04 10:58:02 +02:00
Lauri Vasama aceef4e6cc Overhaul Clift statement operations 2024-09-04 10:58:02 +02:00
Lauri Vasama c7b6fb529f Overhaul Clift module-level operations 2024-09-04 10:58:02 +02:00
Lauri Vasama 16797c864f Add named Clift region constraints 2024-09-04 10:58:02 +02:00
Lauri Vasama 4a88a8798e Overhaul clift::ModuleOp verify and re-enable test
Re-enabled (a fixed version) of the class type recursion unit test that
was previous disabled to work around a parsing issue. Added another unit
test for indirectly recursive class types and another for recursion via
indirection.
2024-09-04 10:58:02 +02:00
Lauri Vasama a758463cfc Create a block in the clift::ModuleOp::build
SymbolTable requires the operation to have exactly one block.
2024-09-04 10:58:02 +02:00
Lauri Vasama 6470dd34ff Miscellaneous Clift cleanup for consistency 2024-06-05 15:07:23 +02:00
Lauri Vasama 0c8a04432e Fix use of size_t to represent type ID 2024-06-05 15:07:23 +02:00
Lauri Vasama 4ebe4fb140 Rename remaining Clift type definition attributes 2024-06-05 15:07:23 +02:00
Alessandro Di Federico 0c212b66d9 Relicense to MIT 2024-02-29 17:03:36 +01:00
Massimo Fioravanti ab856523dd Introduce clift types 2024-02-04 16:49:51 +01:00
Andrea Gussoni ac6139bc0f clift: import mlir::clift dialect 2023-07-07 17:48:13 +02:00