Djordje Todorovic
6349299806
docs: Add simplify-switch artifact
2024-05-29 16:25:53 +02:00
Djordje Todorovic
31b5453551
Support/IRHelpers.h: Add toLLVMConstant()
...
Convert llvm::APInt to llvm::Constant.
2024-05-29 16:25:53 +02:00
Djordje Todorovic
0468a41913
Add DataFlowGraph::materializeOne method
2024-05-29 16:25:53 +02:00
Djordje Todorovic
e527656074
ValueMaterializer: Handle Intrinsic::fshl in DFG
2024-05-29 16:25:53 +02:00
Djordje Todorovic
5c44773b02
ValueMaterializer: Handle llvm::Argument in DFG
2024-05-29 16:25:53 +02:00
Djordje Todorovic
46946df1d3
Adjust x86_64 collect-cfg test
2024-05-29 16:25:53 +02:00
Pietro Fezzardi
15227190d9
Merge branch 'feature/mlir-container'
2024-05-29 15:43:49 +02:00
Lauri Vasama
4a21b8a09b
Add LIT/FileCheck tests for model type import
2024-05-29 15:43:35 +02:00
Lauri Vasama
ba58ec8edb
Add import-clift-types pipe
2024-05-29 15:43:35 +02:00
Lauri Vasama
ba914a1bb5
Replace MLIR container and LLVM import pipe
2024-05-29 15:43:35 +02:00
Lauri Vasama
817b2e1a65
Set revng prefix in MLIR LIT tests
2024-05-29 15:43:35 +02:00
Lauri Vasama
a8e2bb8c48
Add ImportModelType pass, register in clift-opt
2024-05-29 15:43:35 +02:00
Lauri Vasama
7abadd08ae
Add model types to Clift MLIR import
2024-05-29 15:43:35 +02:00
Lauri Vasama
8063efb1e2
Install MLIRCliftDialect library
2024-05-29 15:43:35 +02:00
Lauri Vasama
f4ff27b221
Add ScalarTupleType for RawFunctionType return
2024-05-29 15:43:35 +02:00
Lauri Vasama
c0fd99e0c2
Restrict the dialects available in clift-opt
2024-05-29 15:43:35 +02:00
Lauri Vasama
9f99866edd
Move CliftStorage.h to lib/
2024-05-29 15:43:35 +02:00
Lauri Vasama
6db424b02b
Factor Clift type parsing out into separate files
2024-05-29 15:43:35 +02:00
Lauri Vasama
10a80de57f
Fix Clift type parsing
...
* Allow empty parameter list for FunctionAttr.
* Allow empty field list for struct but not union.
2024-05-29 15:43:35 +02:00
Lauri Vasama
84f7926c9c
Naming and reorganization for consistency
2024-05-29 15:43:35 +02:00
Lauri Vasama
1059c51292
Refactor StructTypeStorage and UnionTypeStorage
2024-05-29 15:43:35 +02:00
Lauri Vasama
b5b79709be
Fix spelling of OnUnexpectedToken
2024-05-29 15:43:35 +02:00
Lauri Vasama
dbdb4aabcb
Add alias for error emission function_ref
2024-05-29 15:43:35 +02:00
Lauri Vasama
58e5a55403
Add support for typedef as enum underlying type
2024-05-29 15:43:35 +02:00
Lauri Vasama
50252c0ec6
Fix no-op asserts
2024-05-29 15:43:35 +02:00
Lauri Vasama
38c0605e76
Fix error message in StructType::parse
2024-05-29 15:43:35 +02:00
Lauri Vasama
25c4710c9a
Fix EnumAttr::verify
...
* Fix enumerator value strict ordering check.
* Remove enumerator name uniqueness check.
2024-05-29 15:43:35 +02:00
Lauri Vasama
786740f935
Fix PointerType::verify
...
Allow pointers with sizes 4 or 8, matching the model.
2024-05-29 15:43:35 +02:00
Lauri Vasama
c24f40ad43
Add missing verify functions
2024-05-29 15:43:35 +02:00
Lauri Vasama
73187864ee
Fix UnionType::verify
...
* Add field type completeness check.
* Remove field name uniqueness check.
2024-05-29 15:43:35 +02:00
Lauri Vasama
5341c2bb0a
Fix StructType::verify
...
* Simplify offset and size checks.
* Add field type completeness check.
* Remove field name uniqueness check.
2024-05-29 15:43:35 +02:00
Lauri Vasama
3a547889a3
Move struct,union get,getChecked defs to .cpp
...
There seem to be some issues with defining these in headers due to the
storage type being incomplete. The storage type is only defined in the
.cpp file.
2024-05-29 15:43:35 +02:00
Lauri Vasama
e9cacbc613
Replace unsigned long with uint64_t
2024-05-29 15:43:35 +02:00
Lauri Vasama
e0eea01527
Reorder StructTypeStorage fields
...
Looking at the MLIR code, the order should match the order of the
parameters in get and verify.
2024-05-29 15:43:35 +02:00
Lauri Vasama
9730b00e88
Remove UnionType::verify size parameter
2024-05-29 15:43:35 +02:00
Lauri Vasama
689b7b08f8
Add TODO on add_mlir_dialect_library
2024-05-29 15:43:35 +02:00
Lauri Vasama
e2f3f31093
Introduce RawFunctionType::Architecture
2024-05-29 15:43:35 +02:00
Lauri Vasama
d49a06bf25
Fix spelling of DefaultRawType
2024-05-29 15:43:35 +02:00
Lauri Vasama
c20c1e9e85
Fix spelling of FunctionEntryMDName
2024-05-29 15:43:35 +02:00
Pietro Fezzardi
0bc8102e68
Merge branch 'feature/mlir-container'
2024-05-29 15:42:37 +02:00
Lauri Vasama
4636bb736f
Fix MIME types documentation
2024-05-29 15:42:15 +02:00
Lauri Vasama
9f7117fe81
Move ModelType test into an .inc file for sharing
2024-05-29 15:42:15 +02:00
Lauri Vasama
8ec89c658c
Template FunctionMetadataCache for use with MLIR
2024-05-29 15:42:15 +02:00
Lauri Vasama
3e33a300d5
Introduce RawFunctionType::Architecture
2024-05-29 15:42:15 +02:00
Lauri Vasama
185afcf4c0
Fix spelling of FunctionEntryMDName
2024-05-29 15:42:15 +02:00
Pietro Fezzardi
927b65b0c3
Merge branch 'feature/basic-type-names-refactor'
2024-05-29 15:34:35 +02:00
Pietro Fezzardi
e1a59e527a
TypeNames: fix missing trailing \n in PTML comment
...
The missing \n was causing following type declaration to be wrongly
commented out.
2024-05-29 15:34:26 +02:00
Pietro Fezzardi
2ee2577152
TypeInlineHelper: drop unused getTypeGraph method
2024-05-29 15:34:26 +02:00
Pietro Fezzardi
746cf5b55d
TypeInlineHelper: rename collectStackTypes method
...
to collectTypesInlinableInStacks and document it.
2024-05-29 15:34:26 +02:00
Pietro Fezzardi
df9d7215b5
TypeInlineHelper: remove unnecessary members
...
`TypeToNumOfRefs` was used only in one method, so it can be computed
directly there on the fly.
`calculateNumOfOccurrences` doesn't need to be a method (it can be a
free function), it doesn't need to run at construction time, and it
doesn't need to return a map. So it's been moved in the `.cpp` file,
renamed to `getCrossReferencedTypes` and changed to return a set. It is
now only called when needed.
2024-05-29 15:34:26 +02:00