This commit adopts `llvm::DenseSet`, `llvm::DenseMap` and
`std::unordered_set` where needed.
It also tweaks some `llvm::SmallVector` sizes.
It brings an additional ~3% improvement during lifting.
This commit disables GVN in order to improve lifting performance.
It also increases `EarlyCSEMssaOptCap` so we keep catching all the jump
target we used to.
Lifting /bin/bash goes from ~29mins to ~5mins
Before this fix, graph preparation sometimes left extra long-edges not
connected to anything in. They were not visible after the SVG
exportation, but they were making edge routing worse (by forcing
horizontal lanes to appear where they shouldn't be - thus spacing nodes
further away from each other than necessary).
Since the `orderEdges` function no longer consumes the graph, we can
finally make the restoration step separate - leading to more explicitly
stated boundaries as to where the graph is a DAG, and where it is not.
Also removed a few entities to avoid duplication in the full names:
- `yield::layout::sugiyama::LayoutOrientation`
-> `yield::layout::sugiyama::Orientation`
- `yield::layout::sugiyama::layout(...)`
-> `yield::layout::sugiyama::compute(...)`
Implement a couple of restructure algorithms in a template manner, so
that they can be used with any data structure implementing
`GraphTraits`.
Test the algorithms using the `GenericGraph` data structure.
Before this commit, the pattern Copy(LocalVariable) used to generate
unnecessarily redundant additional LocalVariables.
This commit fixes this problem, indroducing reuse of local variables
when possible.
The pass was necessary to prevent the creation of local variables with
reference types, caused by calls to custom opcodes tagged with
FunctionTags::IsRef.
These local variables would not be valid for decompilation, because C
doesn't have reference types.
However, creation of such variables would pop up if not deduplicated,
due to the fact these calls could have many uses, and MarkAssignments
had a policy of marking for serialization all the instructions with many
uses.
Now that policy has been dropped, so this pass doesn't need to exist
anymore.