Make `makeDiff` run faster by:
* Utilizing the information exposed by TYPE_HINTS which avoids having
expensive runtime checks
* Optimize some of the hot parts of the codebase to lower run times
Change the behavior of `revng daemon` to avoid a crash at shutdown
caused by `rp_shutdown` not being called due to the pointer of
`rp_manager` not being freed.
Before this commit initModelTypes wasn't able to detect the type of the
callee operand for calls to isolated functions.
This commit properly supports this case.
Before this commit, we were blinding adding the `nomerge` attribute to
function calls. Now we copy attributes over, so we preserve all the
attributes.
In this way the only place where we add the `nomerge` attribute becomes
Isolate.
This test case relies on simple program that calls function from
dynamically linked library (puts function). Function from Procedure
Linkage Table is a wrapper for this call and puts prototype (recognized
from debug symbols) should be propagated to `puts@plt` function.
Verification relies on `revng model compare`.
Fetching prototypes requires internet connection. Adding puts prototype
to test case's model makes it independent of the Internet connection.
The goal of this update is to propagate prototypes of functions called
in wrappers to this wrappers.
When some function hasn't it's own prototype, but the only thing it does
is calling another function, DetectABI pass sets callee prototype as
caller prototype also.
This behaviour is limited to callers that:
1. have only one basic block
2. end with call
3. don't write arguments of callee
4. don't modify stack pointer
5. don't write to memory.
Before this commit, we were only copying the metadata attached to the
CallInst, but we need to copy also the attributes, otherwise we might
lose important information, such as `nomerge`.
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.
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.