This commit drops ValueManipulationAnalysis, which in its original
design based on MinCut and Karger, was never enabled in the
decompilation pipeline.
Until now, VMA was only used in a severely weakened form in
initModelTypes. That for was so weakened that it barely did anything.
We already have a new design for VMA so that it can work before
DataLayoutAnalysis, and on Clift.
At this point, the old VMA is basically useless anyway, and the very few
occasions where it can do something will simply be solved by the
upcoming work on making some of the remaining casts implicit.
At this point it does not make sense to keep VMA alive anymore.
It's a useful shorthand for the cases where one only cares about
a constant number of top values in a range (i.e. first three elements of
a vector) and wants them as named variables. It can be used as:
`auto [First, Second, Third] = takeAsTuple<3>(MyVector)`.
When running ModelToHeader in HeaderToModel, all types need to be
defined in the header for clang to successfully parse the file. Add an
option to `ModelToHeaderOptions` that forces all types to be printed
regardless of stack or inlining rules.
This commit adds the `TargetListContainer` container that allows storing
a list of target for a fixed Kind. Moreover the
`PopulateTargetListContainer` pipe has been added that allows adding all
targets to a `TargetListContainer` from a `Kind` via the
`appendAllTargets` method.
Generalize `FunctionStringMap` into `detail::GenericStringMap`, which
supports any `Depth=1` rank. `FunctionStringMap` remains as an `using`
with `Rank = ranks::Function`.
Implement the pruning of container caches (resume directory) when there
is a mismatch between the current revng components' hash and the saved
one. This functionality is activated via `-check-components-version`.
Before this commit, the `append` function did not work with contained
objects which were not default-constructible. This commit fixes this
behavior by using a different choice of iterator wrappers which avoids
the need for the contained object to be default-constructible.
This commit fixes command line parsing of revng through the
REVNG_OPTIONS environment variable. Previously the env was prepended to
the actual command-line variables, now it's appended, allowing to
specify command line arguments that depend on `-load`s.
The invalidation map passed by callers of pipeline invalidate was
assumed to be always empty. This requirement has been relaxed.
The pipe invalidation cache now checks that what must be removed is
actually present. This is relevant for targets that are killed by later
pipes before the end of the step.
Replace the stub implementation of invalidation with the proper
implementation. A ReadPathCache is added to each global so that it can
keep tracks of what target are associated to which read paths.
This commit introduces two new methods that describe the return value of
a function:
* `returnMethod`: describes how the return value is passed to the
caller.
* `returnValueAggregateType`: the type of the aggregate that is being
returned, in case `returnMethod` is `LocalVariable`.
This commit switches the approach with which we run the ABI analyses: we
now run them until we reach a fixed point. This enables proper
interprocedural propagation of arguments and return values.
Basically, we now inject reads before call sites, so that, if a function
immediately calls another one, the arguments of the callee are
propagated to the caller.
This commit also updates the logic with which we propagate function
prototypes (and names) to callers. The main advantage of this, is that
function wrappers (in particular, PLT entries) now have the same name as
the function they wrap.