86 Commits

Author SHA1 Message Date
Ivan Krysak 81aceca45d CliftContainer: use llvm::StringRef overload
Because of how `StringAttr` comparison works, two attributes with
the same name can be added to one module. Forcing `StringAttr`
recreation from a raw string prevents that.
2026-06-15 17:28:22 +02:00
Ivan Krysak 2a2854c020 CliftEmitC: always emit opaque types in headers 2026-06-15 17:28:22 +02:00
Ivan Krysak ce9918a0c6 Clifter: do not load dialect in the pipe
Container already takes care of that.
2026-06-15 17:28:22 +02:00
Ivan Krysak a83521d337 Ensure no duplicate opaque types in headers 2026-06-15 17:28:22 +02:00
Ivan Krysak 5cd3556765 emit-single-type-definition: add a TODO 2026-06-15 17:28:22 +02:00
Ivan Krysak 3a6ed1e7eb CliftContainer: accept owning module references 2026-06-15 17:28:22 +02:00
Ivan Krysak 77affee259 importType: provide a error-less overload 2026-06-15 17:28:22 +02:00
Ivan Krysak 686dc0877a hasModuleAttr -> isCliftModule 2026-06-15 17:28:22 +02:00
Ivan Krysak 5ddde903c5 emit-c-as-directory: move to new backend 2026-06-15 17:28:22 +02:00
Ivan Krysak 14ea4b6cd7 emit-c-as-single-file: move to new backend 2026-06-15 17:28:22 +02:00
Ivan Krysak 4381f86f31 emit-c: expose options 2026-06-15 17:28:22 +02:00
Ivan Krysak 7a10b14f68 Allow setting type emission options from pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 1a349d1d38 emit-type-definition: expose options 2026-06-15 17:28:22 +02:00
Ivan Krysak 7ca3ee4893 emit-helper-header: expose options 2026-06-15 17:28:22 +02:00
Ivan Krysak a01969b790 emit-type-and-global-header: pipe configuration 2026-06-15 17:28:22 +02:00
Ivan Krysak 8426cf96cb emit-type-definition: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak dc8e090257 CliftContainer: Make sure dialect is always loaded 2026-06-15 17:28:22 +02:00
Ivan Krysak 12355dc51e emit-helper-header: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak c82a01f68b emit-type-and-global-header: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 93f6be619a import-segment-declarations: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 9a0d984c14 import-function-declarations: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak b1dc230199 import-types: new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak 2da35c1252 Clift: pull all the module creation in one place 2026-06-15 17:28:22 +02:00
Ivan Krysak bb71b0e5a6 Clift: pull all the context creation in one place 2026-06-15 17:28:22 +02:00
Ivan Krysak 57bbb7b962 Do not propagate model unnecessarily 2026-06-15 17:28:22 +02:00
Ivan Krysak 0292610212 Introduce emit-single-type-definition 2026-06-15 17:28:22 +02:00
Ivan Krysak ee5534c0ee Introduce single type emission helper 2026-06-15 17:28:22 +02:00
Ivan Krysak 91130e7e7d Introduce emit-helper-header 2026-06-15 17:28:22 +02:00
Ivan Krysak 9d0b75c3b7 Introduce emit-type-and-global-header 2026-06-15 17:28:22 +02:00
Ivan Krysak 20e6a6358f Introduce additional import pipes 2026-06-15 17:28:22 +02:00
Ivan Krysak 7b86b7e890 import-types: create a new module 2026-06-15 11:47:41 +02:00
Ivan Krysak 4c6fe97059 abi::getDataModel: introduce 2026-06-15 11:47:41 +02:00
Lauri Vasama e30a09644e Introduce hoist-variable-initializers pass 2026-05-25 09:00:41 +02:00
Roberto Bertolini 5dcd6334b3 Add Clift local variable scope tightening 2026-05-13 15:32:34 +02:00
Lauri Vasama c7e3a12657 Add implicit cast elision pass 2026-05-04 10:49:07 +03:00
Lauri Vasama 04fe27b8e9 Migrate Clift users to CDataModel 2026-05-04 10:49:03 +03:00
Lauri Vasama dd4e452f96 Add data model import pipes 2026-05-04 10:48:16 +03:00
Lauri Vasama 9bd76c71f9 Split up Clift optimization pipe 2026-04-30 15:09:16 +03:00
Lauri Vasama 90e5dfd4c9 Pass MLIRContext by address
Passing by address is more conventional. This is what MLIR does most of
the time, and it avoids dereferences and addressofs everywhere.
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
Ivan Krysak 71845dcbbb CliftEmitC: stop using mlir::clift namespace 2026-04-22 08:19:47 +00:00
Ivan Krysak 5f511d8e17 verify-against-model: split into two
The resulting pipes are:
1. binary-granularity one with the name unchanged
2. function-granularity one called `verify-function-against-model`.
2026-04-22 08:19:30 +00:00
Ivan Krysak e693cdbd53 model-verify-clift -> verify-against-model 2026-04-22 08:19:30 +00:00
Ivan Krysak f3df0e20b9 Minor improvements 2026-04-21 07:54:50 +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 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
Ivan Krysak 24b08e5439 Drop an unused clift-legalization pipe
It was never used as the corresponding `clift-opt` was used everywhere.
2026-03-27 07:02:32 +00:00
Ivan Krysak 73ddff7126 import-clift-types -> import-types 2026-03-26 16:28:48 +00:00