Since PipelineC is not thread-safe, add a lock to all function calls to
it to avoid any thread safety-related issues.
At the same time, use a thread pool to run "expensive" PipelineC
functions in GraphQL (specifically `produce_target` and `run_analysis`)
to avoid problems due to the cooperative nature of Python coroutines.
This commit adds the newly implemented functionality in PipelineC both
in revng.api and the graphql api, allowing:
* retrieval of global variable names
* unwrapping of a single target
* execution of analyses
Moving it was causing the address of the model to change, while for the
functionality of revng-pipeline we need it to be stable.
So we pay the price of expensive copy, for the sake of downstream
stability.
The copy of a TupleTree is potentially very expensive, so it was
disabled until now and only allowed via the explict method clone().
We have now decided to make TupleTree copiable.
This commit adds a copy-constructor and a copy-assignment, killing the
clone() method that was already unused and is now effectively useless.
This commit introduces a reusable function to compact
pipeline::TargetLists that represent functions.
Initially this reasoning was only needed by TaggedFunctionKind, but now
also FunctionStringMap needs it, and potentially others in the future,
so it makes sense to keep only a single implementation for it instead of
duplicating code (and likely bugs).
The beautification library was split into a separate library for
historical reason, having to do with LLVM passes, their dependencies,
and dirty hacks we had around.
Now the LLVM passes, and the hacks are gone, so we can merge back
everything together.
Now that the late stage of the decompilation pipeline is managed with
revng-pipeline, and we have a standalone tool for decompilation, we
have no need to use LLVM passes anymore for those stages.
This commit also renames the directories to avoid the confusing Pass
suffix, not what LLVM passes are gone.
This commit replace the old CBackendPass with a standalone tool:
revng-decompile.
This pass at the moment runs the three stages of decompilation:
- CFG restructuring
- Beautify GHAST
- C Code generation
This is necessary because now QualifiedType.h needs TypeKind, but
including Type.h directly would result in a circular dependency between
Type.h and QualifiedType.h