Alessandro Di Federico
8e213ade74
TypeShrinking: shrink zext(value) == constant
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
6ed958d614
Improve TypeShrinking
...
This commit fixes a TypeShrinking bug and extends it to better handle
more instructions. Specifically, we now handle shift left, select, phi
and bitwise operations.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
e0c7038f46
Rework RootAnalyzer::optimize pipeline
...
This commit reorganizes and explains the reasoning behind the design of
the RootAnalyzer optimization pipeline.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
99fec2cb10
AdvancedValueInfo: improve logging
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
dcc7ca3c6b
AdvancedValueInfoMFI: zero-extend constraints
...
This commit introduces a change in AdvancedValueInfoMFI which forces to
consider constraints valid on 32-bit values to be valid on their
untruncated 64-bit counterparts.
While being unsound, this is important to easily devirtualize indirect
branches on 64-bit architectures where often constraints are expressed
on 32-bit switch values.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
259d64fc59
MFP::getMaximalFixedPoint: name return result type
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
43baa73149
DOTGraphTraits<MFP::Graph>: improve HTML handling
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
a24f3479ca
JumpTargetManager::readFromPointer: fix unmapped
...
This commit introduces a fix to correctly handle trying to read from an
unmapped region.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
ee335eadf1
GraphTraits: improve handling of const MFP::Graph
...
Improve the handling of const MFP::Graph in GraphTraits and
DOTGraphTraits.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
d4d9e5dac5
DropRangeMetadataPass: preserve all analyses
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
537e25e440
TypeShrinking.h: add missing header
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
73a7041396
Introduce GenericGraph::verify
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
a552bb1920
ConstantRangeSet: introduce size manipulation API
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
1d53bf4696
Introduce getLLVMIntegerTypeFor
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
0b5404b8ac
AdvancedValueInfo: include MFP's DOTGraphTraits
...
The fact we were missing this include led to dump mute graphs.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico
22b3da2a02
Remove {DataFlow,ControlFlowEdges}Graph::Base
2023-07-26 10:16:25 +02:00
Pietro Fezzardi
9c755d89e6
Use only compact annotation macros in tests
2023-07-26 10:01:27 +02:00
Pietro Fezzardi
936fbacd2d
ModelTypeNames: drop leading whitespace
2023-07-26 10:01:27 +02:00
Pietro Fezzardi
abac9233b0
ModelTypeNames: emit ENUM_UNDERLYING for enums
2023-07-26 10:01:27 +02:00
Pietro Fezzardi
8b2e3a70df
ModelTypeNames: annotate stack args with STACK
2023-07-26 10:01:27 +02:00
Pietro Fezzardi
4bbac8220b
PTMLCBuilder: improve const-correctness of methods
2023-07-26 10:01:27 +02:00
Pietro Fezzardi
c1d672712e
Merge branch 'feature/header-to-model'
2023-07-25 12:21:06 +02:00
Djordje Todorovic
1d3cacf6c2
HeaderToModel: support *80_t and *96_t primitives
2023-07-25 12:04:14 +02:00
Djordje Todorovic
943ceff61f
Add tests for ImportModelFromC Analysis
2023-07-25 12:04:08 +02:00
Djordje Todorovic
262e579128
ModelToHeader: annotation for enum underlying type
2023-07-25 12:03:57 +02:00
Djordje Todorovic
5c0167f792
Add ImportModelFromC Analysis
...
This analysis will be used for the following features:
1) Edit Type in the Model
2) Edit Function Prototype in the Model
3) Add Type to the Model
It takes C code as an input, parses it and produces a Model
type that represents the C type.
2023-07-24 11:51:47 +02:00
Djordje Todorovic
60ebfa950d
VerifyHelper: Remember the reason of fail
...
In some cases we want to know what was the reason of some error
without crashing the revng.
2023-07-24 09:22:07 +02:00
Djordje Todorovic
0e176f3147
Support for uint64_t in pipeline analyses options
2023-07-24 09:22:07 +02:00
Djordje Todorovic
e6b128c17b
ModelToHeader: Print annotation __attributes__
...
This will be useful for `edit/add type` feature,
since we will be able to specify which ABI describes
a function, from the source code written in C.
2023-07-24 09:17:08 +02:00
Alessandro Di Federico
15a8708f89
Merge branch 'feature/comments-in-the-model'
2023-07-21 17:25:28 +02:00
Alessandro Di Federico
4daa8e68d6
Merge branch 'feature/comments-in-the-model'
2023-07-21 17:25:26 +02:00
Ivan Krysak
2136e05115
Fix a nasty issue caused by an uninitialized flag
2023-07-21 17:25:24 +02:00
Ivan Krysak
19138353f7
abi::FunctionType: preserve return value comments
2023-07-21 17:25:24 +02:00
Ivan Krysak
11c221299e
Yield: add the function comment to assembly view
2023-07-21 17:25:24 +02:00
Ivan Krysak
ed4efb0bd9
yield::ptml: add functionComment function
2023-07-21 17:25:24 +02:00
Ivan Krysak
18204ccb9f
yield::ptml: add comment function
...
This is a generic way to format an arbitrary type with `Comment`
field as a comment and emit it using PTML.
2023-07-21 17:25:24 +02:00
Ivan Krysak
4654e4ef74
Ranks: introduce ranks for function arguments
2023-07-21 17:25:24 +02:00
Ivan Krysak
888b083248
Model: introduce edit path helpers for comments
2023-07-21 17:25:24 +02:00
Ivan Krysak
5c31405e63
Model: rework edit path helpers from the ground up
2023-07-21 17:25:24 +02:00
Ivan Krysak
0c8a5aaffb
Model: move edit path helpers in from PTML
2023-07-21 17:25:24 +02:00
Ivan Krysak
8fb21693cc
CompileTime: improve documentation
2023-07-21 17:25:24 +02:00
Ivan Krysak
a012c752e2
CompileTime: introduce selection helper template
2023-07-21 17:25:24 +02:00
Ivan Krysak
b2506d8f4b
STLExtras: separate compile time helpers
2023-07-21 17:25:24 +02:00
Ivan Krysak
70a5c8edd0
Model: make metadata utilities more generic
2023-07-21 17:25:24 +02:00
Ivan Krysak
560ed4f55e
Model: add ReturnValueComment field to functions
2023-07-21 17:25:24 +02:00
Ivan Krysak
485ef34a12
Model: add Comment field all across the board
2023-07-21 17:25:24 +02:00
Ivan Krysak
8a9b253314
Model: clean type constructors up
2023-07-21 17:25:24 +02:00
Ivan Krysak
1e9e38548d
Model: make register name check stricter
2023-07-21 17:25:24 +02:00
Ivan Krysak
bc0eebaad1
Model: enforce consistent name fields
2023-07-21 17:25:24 +02:00
Ivan Krysak
7893d53ef8
TTG: add Parent using definition
2023-07-21 17:25:24 +02:00