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
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
ecaec9b2f1
Add typedef-unwrapping Clift type casts
...
* `clift::unwrapped_isa`
* `clift::unwrapped_isa_and_present`
* `clift::unwrapped_cast`
* `clift::unwrapped_cast_if_present`
* `clift::unwrapped_dyn_cast`
* `clift::unwrapped_dyn_cast_if_present`
These casts first unwrap typedefs and then behave equivalently to their
usual LLVM counterparts.
2026-04-08 12:23:49 +03:00
Lauri Vasama
db2b57e867
Add Clift ObjectType type interface
2026-04-08 12:22:33 +03:00
Lauri Vasama
92ad229ff0
Move BytecodeClassAttr into a separate file
2026-04-08 12:21:16 +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
4cd4de4f83
Improve Clift type tablegen definitions
2026-04-08 11:12:41 +03:00
Lauri Vasama
82ae097c18
Improve Clift operation type constraints
2026-04-08 11:12:41 +03:00
Lauri Vasama
5198af8ba7
Improve Clift free function type property helpers
2026-04-08 11:12:41 +03:00
Lauri Vasama
007ae24bb0
Simplify Clift expression pattern definitions
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
Lauri Vasama
3b731330b9
Fix getPointeeType expression rewrite helper
2026-04-08 11:12:41 +03:00
Lauri Vasama
9e71f608b7
Fix Clift AliasableType description
2026-04-08 11:12:41 +03:00
Giacomo Vercesi
b40fec2270
Add LLMRename analysis to pypeline
2026-03-31 17:00:48 +02:00
Giacomo Vercesi
63a11d0c63
pypeline: add Analysis.is_available
...
Add a method to the `Analysis` interface which allows an analysis to
report if it is available for execution.
2026-03-31 17:00:48 +02:00
Ivan Krysak
c354642902
Clifter: fix a newly introduced bug
...
This fixes the invalidation problem introduced by reading attributes
in the scope whose execution order depends on the function processing
order.
2026-03-27 12:27:26 +00:00
Ivan Krysak
6f02461948
Clift: fix missed getAttributes methods
...
They are now correctly named `getCAttributes`.
2026-03-27 12:27:16 +00:00
Ivan Krysak
5ca78e8897
emitCAttributes: improve spacing control
2026-03-27 08:27:23 +00:00
Ivan Krysak
9de53e434d
CAttributes: introduce _NORETURN
2026-03-27 08:24:10 +00:00
Ivan Krysak
446e8cb88d
CAttributes: introduce _ALWAYS_INLINE
2026-03-27 08:23:31 +00:00
Ivan Krysak
fad05621cc
CAttributes: drop IsReal property
2026-03-27 08:22:52 +00:00
Ivan Krysak
378bfb650f
CliftEmitC: Attributes -> CAttributes
2026-03-27 08:22:23 +00:00
Ivan Krysak
754cfd57fe
Model: introduce migration to version 9
2026-03-27 08:19:21 +00:00
Ivan Krysak
de31315cd7
Model: rename Inline into AlwaysInline
2026-03-27 08:16:21 +00:00
Ivan Krysak
19741a32ab
ImportModel: expose a high level type importer
2026-03-27 08:15:23 +00:00
Ivan Krysak
b632772cbb
ImportModel: import function attributes
2026-03-27 08:12:51 +00:00
Ivan Krysak
00f05cac7a
ImportModel: introduce importSegmentDeclaration
2026-03-27 08:12:17 +00:00
Ivan Krysak
8f89984f36
ImportModel: introduce importFunctionDeclaration
2026-03-27 08:11:11 +00:00
Ivan Krysak
c30f309f5e
Clift: introduce getMutableComment
2026-03-27 08:09:09 +00:00
Ivan Krysak
e34fbcb955
FunctionOp: add noreturn and always_inline
2026-03-27 08:08:08 +00:00
Ivan Krysak
318681cd42
Introduce TypeDependencyGraph
2026-03-27 08:05:10 +00:00
Ivan Krysak
1c14ae1c93
Introduce: CAttributeListBuilder
2026-03-27 07:19:27 +00:00
Ivan Krysak
729b025de3
CAttributes.h: move back to PTML
...
When `revng` and `revng-c` were being merged, this header founds its
way into `revngSupport` even though it makes more sense under the PTML
umbrella.
2026-03-27 07:19:27 +00:00
Ivan Krysak
e706628a49
Rename Annotations.h into CAttributes.h
2026-03-27 07:19:27 +00:00
Ivan Krysak
7f66f25253
mlir::clift::ClassAttr: add attribute support
2026-03-27 07:19:27 +00:00
Ivan Krysak
928bcdb118
mlir::clift::FunctionType: add attribute support
2026-03-27 07:19:27 +00:00
Ivan Krysak
8a3a2082b5
CAttributeAttr: enforce argument types
2026-03-27 07:19:27 +00:00
Ivan Krysak
f4e7d50361
Allow C-Attributes to accept integers and types
2026-03-27 07:18:49 +00:00
Lauri Vasama
ad6f6df04e
Improve function arg/result attribute interface
2026-03-27 07:18:49 +00:00
Ivan Krysak
cdc633e31d
CliftPipes: drop Pipe from filenames
...
This removes unnecessary Pipe from filenames which the directory name
already contains.
This also renames some of them to match the *new* pipeline.
2026-03-27 07:18:49 +00:00
Ivan Krysak
278b898793
llvm-to-clift -> clifter
2026-03-27 07:05:44 +00:00