This pass wraps LLVM's vanilla InstCombine, to hijack one of its
options. The goal of this hijack is to prevent InstCombine from
splitting and replacing accesses to arrays with GEPs and smaller
accesses.
This pass wraps LLVM's vanilla SROA, to hijack one of its options.
The goal of this hijack is to prevent SROA from splitting and replacing
memory accesses to arrays with GEPs and smaller accesses.
This will be used to collect various customizations of LLVM passes, that
are necessary to enable setting different default options to passes for
insertion in the revng pipeline.
Clean up the `ProgramRunner` class:
* use llvm-provided wrappers and system-agnostic variables to compute
the `Paths` variable
* pre-compute the list of path variables so it's not re-computed on
every invocation of `run` or `isProgramAvailable`
* Wrap the logging code so that it's not triggered if the logger is
disabled
This commit changes the prototype of getCopeType, so that it now takes 2
arguments.
1. The llvm::Type returned by the Copy function. This can be any scalar
llvm::Type.
2. The llvm::type of the argument representing the reference to the
value being copied. This should be a pointer-sized integer, where
pointer-sized means with the same size of a pointer in the
architecture in the input binary.
The second argument is not strictly necessary for now, because the whole
decompilation framework expects a binary with a single architecture,
hence a well defined unambiguous pointer size.
This will be used fully only when we start supporting multiple binaries.
Whenever that happens, if we haven't already fully dropped the Copy
helper function we will have to update the associated
OpaqueFunctionsPool to a type pair as key: the return type and the type
of the argument.
Introduce the `ScopeCloser` and `GotoTarget` annotations in the IR, and
the relative necessary machinery, needed to handle scope closer and goto
edges for the new backend.
A specialization of the `llvm::GraphTraits`, called `ScopeGraph`, that
is able to handle both the above mentioned annotations is provided.
For the `llvm::GraphTraits` implementation, we introduce the
`GeneratorIterator` class, which uses a coroutine to store the status of
the iteration.
A debug logger pass is added, so that we are able to test the
functionality with `FileCheck`.
Implement the `zstdCompress` and `zstdDecompress` functions. Also
implement the `ZstdCompressedOstream` which is a `llvm::raw_ostream`
which compresses data on the fly.
Make the cache directory logic uniform in Python and C++, move the
respective implementations under support since it's project-wide logic
and not exclusive to debug-info.