Ivan Krysak
62a37ba6f4
yield::ptml: add functionComment function
2023-07-21 17:24:45 +02:00
Ivan Krysak
49da16e0b7
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:24:45 +02:00
Ivan Krysak
dec0daeb08
Ranks: introduce ranks for function arguments
2023-07-21 17:24:45 +02:00
Ivan Krysak
2630665875
Model: introduce edit path helpers for comments
2023-07-21 17:24:45 +02:00
Ivan Krysak
b5ac540c9c
Model: rework edit path helpers from the ground up
2023-07-21 17:24:45 +02:00
Ivan Krysak
1919a58414
Model: move edit path helpers in from PTML
2023-07-21 17:24:45 +02:00
Ivan Krysak
113d538e9e
CompileTime: improve documentation
2023-07-21 17:24:45 +02:00
Ivan Krysak
7adb585ae8
CompileTime: introduce selection helper template
2023-07-21 17:24:45 +02:00
Ivan Krysak
78b4dbbc90
STLExtras: separate compile time helpers
2023-07-21 17:24:45 +02:00
Ivan Krysak
56e3880b67
Model: make metadata utilities more generic
2023-07-21 17:24:45 +02:00
Ivan Krysak
e4c2c83c2c
Model: add ReturnValueComment field to functions
2023-07-21 17:24:45 +02:00
Ivan Krysak
830cb37c4a
Model: add Comment field all across the board
2023-07-21 17:24:45 +02:00
Ivan Krysak
05249be206
Model: clean type constructors up
2023-07-21 17:24:45 +02:00
Ivan Krysak
2a15347138
Model: make register name check stricter
2023-07-21 17:24:45 +02:00
Ivan Krysak
c3fe9bab48
Model: enforce consistent name fields
2023-07-21 17:24:45 +02:00
Kacper Kołodziej
b05a56e2da
Move isMemory to IRHelpers.h
2023-07-20 18:09:48 +02:00
Kacper Kołodziej
75ed8f7788
Add WrittenRegisters set to FunctionSummary
...
WrittenRegisters will be used in propagating prototypes to wrappers
functionality to check if function writes to arguments or stack pointer.
2023-07-20 18:09:48 +02:00
Andrea Gussoni
c8871fc508
GraphAlgorithms: drop old nodesBetween
...
We now switch to the `llvm::df_iterator` based `nodesBetween`
implementation.
This new implementation makes use of the idiomatic way of extending the
DFS implementation provided by LLVM, instead of rolling our custom
implementation for the `nodesBetween` algorithm.
2023-07-07 15:02:08 +02:00
Andrea Gussoni
f7db37e990
SetOperations: new header with useful set helpers
2023-07-07 15:02:08 +02:00
Andrea Gussoni
1a0c429ef9
GraphAlgorithms: introduce extended DFS algorithms
...
We improve the `getBackedges` and `nodesBetween` helper functions that
can be used for backedge discovery and computation of all the nodes
reachable on all the paths defined between two nodes in a graph.
We build upon the `llvm::df_iterator` function, by customizing the visit
stack to perform the desired visits.
2023-07-07 15:02:08 +02:00
Andrea Gussoni
a613b873e8
GraphAlgorithms: introduce isDAG verifier helper
2023-07-07 13:33:30 +02:00
Ivan Krysak
ce6d9a6dbf
Formatting: forbid \brief
2023-07-05 14:33:03 +02:00
Ivan Krysak
ee0dc1866d
Forbid clang format off
2023-07-03 15:23:10 +00:00
Ivan Krysak
9f1d9fd5d0
Use Container::contains() where appropriate
2023-07-02 15:06:11 +00:00
Ivan Krysak
5779cd878d
KOCs: make more STL-like
...
This adds a couple of newer methods missing from these templates.
2023-07-02 15:06:11 +00:00
Ivan Krysak
4ab4d85ead
STLExtras: remove incomplete iterator concepts
2023-07-02 15:06:11 +00:00
Ivan Krysak
690df84eca
Concepts: prefer non-strict SpecializationOf
...
Not every case can benefit from extra liniency, so they were manually
reviewed on a case by case basis.
Additionally, this drops a couple of "this should be a non-strict
specialization" commits, because of a bug with clang
(see the GenericGraph concepts rework commit for more details) as
to avoid confusion (we wouldn't want anyone trying to solve these
"todo"s) until the clang struct type deduction is fixed. Especially
considering that there are currently no cases where these softer
versions would be beneficial (we never inherit from templates in
question).
2023-07-02 15:06:11 +00:00
Ivan Krysak
37b8f80bf1
Concepts: introduce SpecializationOf
...
It was not available earlier because it required clang-13+
2023-07-02 17:05:52 +02:00
Ivan Krysak
b927e26f94
Drop concepts provided by the standard library
...
We needed these because our libc++ version didn't provide them. Now that
that's no longer the case, they can be safely dropped.
2023-07-02 13:20:49 +02:00
Ivan Krysak
a123ec2c35
Remove clang-format off around concepts
...
Now that clang-format no longer breaks anything involving a concept or
a requires clause on sight, these are no longer necessary
2023-07-02 13:20:49 +02:00
Ivan Krysak
bc98e0079f
Formatting: change PenaltyReturnTypeOnItsOwnLine
...
The new value is 21.
2023-07-02 13:20:49 +02:00
Ivan Krysak
01b4ec36c9
Formatting: set AllowShortEnumsOnASingleLine
...
The new value is `false`.
2023-07-02 13:15:08 +02:00
Ivan Krysak
c523167302
Formatting: enforce access modifier whitespaces
2023-07-02 13:09:52 +02:00
Ivan Krysak
7ed14ca65c
Minor improvements
2023-07-02 11:06:55 +00:00
Alessandro Di Federico
a65ccc3413
Introduce ValueMaterializer
...
`ValueMaterializer` is a rewrite of what was called `AdvancedValueInfo`
which follows the same principles.
The main benefits over the old version is:
* We materialize the data-flow graph and the CFG of the relevant part of
root. This makes debugging significantly easier.
* We drop the old MonotoneFramework infrastructure in favor of
getMaximalFixedPoint.
* We significantly reduce the amount of queries we make to
AdvancedValueInfo.
2023-06-30 13:39:22 +02:00
Alessandro Di Federico
4c01d9c28d
BidirectionalNode: implement edge removal
2023-06-30 13:38:27 +02:00
Alessandro Di Federico
4edcb6dd49
MetaAddress::decomposeIntegerPC: accept APInt
2023-06-30 13:35:04 +02:00
Alessandro Di Federico
466871e866
Introduce RegisterClobberer
2023-06-30 13:28:36 +02:00
Alessandro Di Federico
f120ad334c
Statistics.h: rework
2023-06-30 13:06:58 +02:00
Alessandro Di Federico
5e72f8e31b
ConstantRangeSet::dump: custom APInt formatter
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
08b8b0bd9f
ConstantRangeSet::size: fix corner case
...
In order to correctly represent the size of a 32-bit ConstantRange, you
need 33 bits.
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
b21861b7f9
GraphTraits<GenericGraph>: fix const support
...
GraphTraits were not fully usable in case of a `const` graph due to a
missing std::conditional_t for the definition of the `Node` type.
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
5ebec631b9
getMaximalFixedPoint: fix Flow argument type
2023-06-30 12:35:18 +02:00
Ivan Krysak
e3be901f1f
STLExtras: allow skip to result in empty ranges
...
This only affects the case where the number of elements to be skipped
exactly matches the number of elements in the container.
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
d3c37fc692
ProgramCounterHandler::expandNewPC: take CallBase
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
84dd10cbdb
GenerichGraph.h: nullptr-initialize Edge::Neighbor
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
b53d3f457b
Minor changes
2023-06-30 12:35:18 +02:00
Alessandro Di Federico
fa61c784c2
Reintroduce st0_x86 as floating point return value
2023-06-23 17:54:16 +02:00
Djordje Todorovic
f05c08547d
ptml: Introduce PTMLBuilder class
...
By using this class we can create ptml::Tags without
XML tags. It is useful in the revng-c part when we
want to generate Plain C. All PTML Tags, from now on,
should be created via this class only.
In addition, port `Yield` library to be using this.
2023-06-09 17:15:30 +02:00
Ivan Krysak
ec90ac0083
yield::Instruction: add getRelativeAddressBase
...
This helper computes the architecture-specific base for PC-relative
immediate originating from the given instruction.
2023-05-25 06:36:58 +00:00