Lauri Vasama
8e72ad8e48
Improve Clift module verification
2026-04-08 11:12:41 +03:00
Lauri Vasama
a37f3195d9
Homogenize static assertions in primitive-types.h
2026-04-08 11:12:41 +03:00
Lauri Vasama
b062b23ad6
Include stddef.h in primitive-types.h
2026-04-08 11:12:41 +03:00
Lauri Vasama
c0ca9222ce
Fix Clift immediate emission
2026-04-08 11:12:41 +03:00
Lauri Vasama
90658bbbed
Change default C target size of long
...
Currently there is only a single default target used for all C emission.
However, the emitted code is actually compiled using multiple
implementations (32-bit and 64-bit targets), some of which use a 32-bit
wide long. This causes integer literals to be emitted with wrong sizes
on those targets. This change forces all 64-bit literals to be emitted
using long long, which is 64 bits wide in all relevant implementations.
2026-04-08 11:12:41 +03:00
Lauri Vasama
71f1fa128a
Remove unnecessary function type verification
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
c0b774369b
Remove bad comment in CliftOpInterfaces.cpp
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
Giacomo Vercesi
b40fec2270
Add LLMRename analysis to pypeline
2026-03-31 17:00:48 +02:00
Giacomo Vercesi
14d95a924d
pypeline: rework fields in pipeline metadata
...
Rework which information is transmitted in the pipeline metadata,
avoiding redundancy and moving some information there instead of
returning it every time a request is made.
2026-03-31 17:00:48 +02:00
Andrea Gussoni
fab35aaa24
EmitFieldAccesses: unwrap typedef in subscript
...
Use a `bitcast` to unwrap a `typedef` passed as `Pointer` operand to a
`subscript`, which requires it to be a raw `PointerType`.
2026-03-30 16:03:37 +02:00
Andrea Gussoni
82945de055
EmitFieldAccesses: support pointer as array
...
Introduce the support to decouple the `BaseType` from `BasePointer`
pointee type.
This enable us to wrap pointee typees into an implicit array. This
enables pointer arithmetic rewriting of `*(p + i)` as `p[i]`.
2026-03-30 16:03:37 +02:00
Ivan Krysak
1b689079d1
Clifter: enforce lambda captures
2026-03-27 14:11:04 +01:00
Lauri Vasama
9d58a4ab9d
Clifter: make a warning louder and expand it
2026-03-27 14:10:17 +01: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
1f5ca9f40e
Clift: ensure _REG and _STACK are exclusive
2026-03-27 08:28:46 +00:00
Ivan Krysak
82e86cf167
Emit prototype attributes *before* the prototype
2026-03-27 08:27:52 +00:00
Ivan Krysak
5ca78e8897
emitCAttributes: improve spacing control
2026-03-27 08:27:23 +00:00
Ivan Krysak
a03e944403
CEmitter: emit unit attributes
2026-03-27 08:26:55 +00:00
Ivan Krysak
378bfb650f
CliftEmitC: Attributes -> CAttributes
2026-03-27 08:22:23 +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
35fe2309c3
import-types: use clift.types as the attribute
...
Before this, `clift.test` was used
2026-03-27 08:14:53 +00:00
Ivan Krysak
756c097900
Import dynamic function prototype
2026-03-27 08:14:22 +00:00
Ivan Krysak
cbfa009aa4
Factor function prototype importing out
2026-03-27 08:13:52 +00:00
Ivan Krysak
882fed11ad
emitFunctionPrototype: simplify helper handling
2026-03-27 08:13:25 +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
02ae9bfac3
Clifter: adopt importFunctionDeclaration
2026-03-27 08:11:45 +00:00
Ivan Krysak
8f89984f36
ImportModel: introduce importFunctionDeclaration
2026-03-27 08:11:11 +00:00
Ivan Krysak
e250657c0b
ImportDescriptiveInfo: import return value comment
2026-03-27 08:10:41 +00:00
Ivan Krysak
d6edb20142
ImportDescriptiveInfo: import comments
2026-03-27 08:10:10 +00:00
Ivan Krysak
c30f309f5e
Clift: introduce getMutableComment
2026-03-27 08:09:09 +00:00
Ivan Krysak
318681cd42
Introduce TypeDependencyGraph
2026-03-27 08:05:10 +00:00
Ivan Krysak
aa53ba5d0b
ImportDescriptiveInfo: import argument attributes
2026-03-27 08:04:40 +00:00
Ivan Krysak
58257d5520
ImportModel: import _ABI
2026-03-27 08:04:10 +00:00
Ivan Krysak
105f15266b
ImportModel: import _CAN_CONTAIN_CODE
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
5c55680e49
PTML: fix list attribute emission
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
b1781988e0
Backend: do not require full attribute presence
2026-03-27 07:18:49 +00:00
Ivan Krysak
c789aba269
CliftAttributes: ensure field lifetime is extended
2026-03-27 07:18:49 +00:00
Ivan Krysak
92fd9188d5
ImportDescriptiveInfo: improve an error message
2026-03-27 07:18:49 +00:00