Commit Graph

6113 Commits

Author SHA1 Message Date
Ivan Krysak e67a08ce05 HeaderToModel: greatly improve reported errors 2024-09-04 16:43:40 +02:00
Ivan Krysak cc16b8f3c8 HeaderToModel: improve RFT argument handling 2024-09-04 16:43:23 +02:00
Ivan Krysak 60391c9ab6 HeaderToModel: forbid stack return values in RFTs 2024-09-04 16:43:07 +02:00
Ivan Krysak adb1551283 HeaderToModel: make type ID detection stricter 2024-09-04 16:42:50 +02:00
Ivan Krysak 73a723e9f4 HeaderToModel: rework error reporting 2024-09-04 16:42:29 +02:00
Ivan Krysak f7fa47fc72 HeaderToModel: add size tag to the other tests 2024-09-04 13:04:44 +03:00
Ivan Krysak 748e4dd560 HeaderToModel: add code annotation support 2024-09-04 13:04:44 +03:00
Ivan Krysak cb82331a17 HeaderToModel: add struct size annotation support 2024-09-04 13:04:44 +03:00
Ivan Krysak e708f3f8fc HeaderToModel: add padding annotation support 2024-09-04 13:04:44 +03:00
Ivan Krysak ee22a5a558 HeaderToModel: clean up type replacement 2024-09-04 13:04:44 +03:00
Ivan Krysak 000d9f26aa HeaderToModel: revamp annotation parsing 2024-09-04 13:04:44 +03:00
Ivan Krysak b297bec1bb HeaderToModel: clean up global strings 2024-09-04 13:04:44 +03:00
Ivan Krysak 7b00b85647 PTMLCBuilder: introduce a code tag annotation 2024-09-04 13:04:44 +03:00
Ivan Krysak 2c9c780a3d PTMLCBuilder: introduce a _SIZE annotation 2024-09-04 13:04:44 +03:00
Ivan Krysak 4a080cae0c PTMLCBuilder: introduce a _START_AT annotation 2024-09-04 13:04:44 +03:00
Ivan Krysak cae04be8fd PTMLCBuilder: clean up annotation method naming 2024-09-04 13:04:44 +03:00
Ivan Krysak dc6f2456be Minor improvements 2024-09-04 13:04:44 +03:00
Pietro Fezzardi 993b900cc7 Merge branch 'feature/clift-ops' 2024-09-04 11:17:11 +02:00
Lauri Vasama 35759476b6 Add Clift LIT/FileCheck tests
Some C++ unit tests were also converted into more easily maintainable
LIT/FileCheck tests.
2024-09-04 10:58:02 +02:00
Lauri Vasama ee14ba2366 Add unique_handle to Clift module-level operations 2024-09-04 10:58:02 +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 a3f7b879d2 Add Clift operation traits
* Rename CliftTraits.h to CliftOpTraits.h.
* Add NoFallthrough operation trait.
2024-09-04 10:58:02 +02:00
Lauri Vasama 748accaa38 Add Clift operation interfaces 2024-09-04 10:58:02 +02:00
Lauri Vasama 2b83648336 Reorder CliftOps.td includes 2024-09-04 10:58:02 +02:00
Lauri Vasama d02c543f6c Remove redundant using directive 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 f0d707be70 Fix Clift class type field parsing 2024-09-04 10:58:02 +02:00
Lauri Vasama 0775ad4bd1 Fix Clift model import LIT tests 2024-09-04 10:58:02 +02:00
Ivan Krysak 8f41b0017e Model: fix failure to parse void 2024-08-30 14:40:09 +02:00
Pietro Fezzardi 7056c60ac2 Merge branch 'feature/stack-memcpy' 2024-08-26 17:09:54 +02:00
Alessandro Di Federico 14734eb3f0 ComputeStackAccessesBounds: add logging 2024-08-23 18:02:10 +02:00
Alessandro Di Federico d28af50f84 DetectStackSize: handle counted loops 2024-08-23 18:01:47 +02:00
Alessandro Di Federico 7b2f02c519 DisassemblyHelper: default initialize struct 2024-08-23 15:01:29 +02:00
Alessandro Di Federico 79d7c211dc Merge branch 'feature/ignore-default-prototype' 2024-08-16 16:33:55 +02:00
Ivan Krysak 953bc49369 ABI-tests: fix a broken comparison operator 2024-08-16 16:33:39 +02:00
Alessandro Di Federico b69c5d2b99 ConvertToCABI: ignore DefaultPrototype 2024-08-16 16:33:39 +02:00
Ivan Krysak df4bf51c75 ABI: improve the type filtering helper
It now supports specifying a list of types to ignore.
2024-08-16 16:33:39 +02:00
Alessandro Di Federico 670b519973 model compare: fix typos 2024-08-16 16:33:10 +02:00
Alessandro Di Federico a19b53974b check-conventions: adopt dict.fromkeys 2024-08-16 15:21:37 +02:00
Alessandro Di Federico d28bc717c6 model compare: report best match upon failure 2024-08-16 13:36:19 +02:00
Alessandro Di Federico 5c9b6ed9b3 Rename DILogger into Log 2024-08-16 13:27:00 +02:00