Pietro Fezzardi
4549e71a22
Add TODO for future refactoring
2024-06-10 17:41:02 +02:00
Pietro Fezzardi
84a40d0239
TypeInlineHelper: clean up members and methods
2024-06-07 17:59:06 +02:00
Pietro Fezzardi
7a38a257b9
Refactor TypeInlineHelper::findTypesToInline
...
This change is a preparation for further decoupling of the
TypeInlineHelper from its custom dependency graph type, to try and reuse
the DependencyGraph used in ModelToHeader.
2024-06-07 17:59:06 +02:00
Pietro Fezzardi
914ef9cc41
Better documentation for DisableStackTypeInlining
2024-06-07 17:56:14 +02:00
Lauri Vasama
f4001063a7
Add note on temporary nature of scalar tuple
2024-06-05 15:07:23 +02:00
Lauri Vasama
cccee1ed99
Add structured Clift type alias generation
2024-06-05 15:07:23 +02:00
Lauri Vasama
d822e463e2
Use clift::ValueType instead of mlir::Type
2024-06-05 15:07:23 +02:00
Lauri Vasama
6470dd34ff
Miscellaneous Clift cleanup for consistency
2024-06-05 15:07:23 +02:00
Lauri Vasama
9f7cfa183f
Reorganize Clift code
2024-06-05 15:07:23 +02:00
Lauri Vasama
b1afb79302
Add Clift_ prefix to all Clift tablegen defs
2024-06-05 15:07:23 +02:00
Lauri Vasama
4ebe4fb140
Rename remaining Clift type definition attributes
2024-06-05 15:07:23 +02:00
Lauri Vasama
a310080fbd
Rename Clift StructType and UnionType attributes
2024-06-05 15:07:23 +02:00
Lauri Vasama
8f19b5f351
Remove redundant global namespace qualifiers
2024-06-05 15:07:23 +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
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
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
f4ff27b221
Add ScalarTupleType for RawFunctionType return
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
c24f40ad43
Add missing verify functions
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
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
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
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
Pietro Fezzardi
196a15685f
Rename TypeInlineHelper::findStackTypesPerFunction
...
to TypeInlineHelper::findTypesToInlineInStacks, which is more
descriptive of what the method actually does.
2024-05-29 15:34:26 +02:00
Pietro Fezzardi
f1fedf4e4e
Drop unused TypeInlineHelper::getTypeToNumOfRefs
2024-05-29 15:34:26 +02:00
Alessandro Di Federico
e22ea4b2d8
Minor changes
2024-05-29 12:23:32 +02:00
Alessandro Di Federico
47c3dd8f0f
Drop model::Segment::Sections
2024-05-22 10:25:25 +02:00
Alessandro Di Federico
31b1b66f44
Reorder model::Binary fields
2024-05-22 10:25:25 +02:00
Alessandro Di Federico
c061f1f971
Make Pipe::checkPrecondition mandatory
2024-05-22 10:25:25 +02:00
Alessandro Di Federico
b05ab6ff3c
Make Pipe::checkPrecondition mandatory
2024-05-21 09:44:04 +02:00
Djordje Todorovic
c4eda86471
MakeModelCast: Change OpaqueFunctionsPool
...
Introduce new key: use TypePair instead of Type *.
2024-05-16 17:57:22 +02:00
Pietro Fezzardi
1fac9d0586
Fix mayReadMemory for stack custom opcodes
...
Before this commit, the mayReadMemory helper function was broken for
the two custom opcode functions used to model stack variables:
revng_stack_frame and revng_call_stack_arguments.
This means that those two functions were already considered as reading
memory, while the actually do not.
This commit fixes that, so that mayReadMemory now always properly
returns false for them.
2024-05-14 18:20:50 +02:00
Andrea Gussoni
1ceda0e8cb
ASTNode: STL practice consistency
2024-05-07 14:01:56 +02:00
Alessandro Di Federico
31344a3270
Add missing includes
2024-05-03 21:55:33 +02:00
Alessandro Di Federico
bf6cefc05a
Externalize functions to improve build times
2024-05-03 21:52:40 +02:00
Alessandro Di Federico
fe1dffcffd
Add some missing includes
...
This is in preparation of reducing headers in Debug.h.
2024-05-03 21:52:40 +02:00
Alessandro Di Federico
25c7834b21
Introduce test_adt
...
This should reduce build times.
2024-05-03 21:52:40 +02:00