Commit Graph

12 Commits

Author SHA1 Message Date
Alessandro Di Federico f8bd4c3bac Move around some files in preparation for libtcg
* Make the following private headers public:
  * Lift/CPUStateAccessAnalysisPass.h
  * Lift/CSVOffsets.h
  * Lift/PTCDump.h
  * Lift/VariableManager.h
* Move from revngSupport to revngLift:
  * IRAnnotators.{h,cpp}
  * SelfReferencingDbgAnnotationWriter.{h,cpp}
* Move from revngSupport to revngModel:
  * FunctionTags.{h,cpp}
  * ProgramCounterHandler.{h,cpp}
* Move from revngSupport to revngRecompile:
  * OriginalAssemblyAnnotationWriter.{h,cpp}
2025-10-24 15:34:11 +02:00
Andrea Gussoni c060f07ecd ScopeGraph: add scope-graph-output cl::opt 2025-07-23 11:34:13 +02:00
Andrea Gussoni 10055101c5 ScopeGraph: detail namespace to avoid clash
Define the `getScopeGraphSuccessors` and `getScopeGraphPredecessors`
in the `detail` namespace in order to avoid clashes.
2025-04-30 16:10:54 +02:00
Andrea Gussoni 71988af041 Fix MIT license 2025-04-30 16:10:54 +02:00
Andrea Gussoni 1482a5e110 ScopeGraph: improve ScopeGraph .dot name
Include the function name in the filename of the dumped `.dot` of the
`ScopeGraph`.
2025-04-02 16:47:14 +02:00
Andrea Gussoni ec8972cbed ScopeGraph: require pointer type for ScopeGraph 2025-03-11 12:25:23 +01:00
Andrea Gussoni 9af0c2962c ScopeGraph: dump .dot of the ScopeGraph
Dump the `.dot` file representing the `ScopeGraph` in the
`dumpScopeGraph` debug function.
2025-01-15 11:54:28 +01:00
Andrea Gussoni d2fa797d5e ScopeGraph: implement DOTGraphTraits
Provide the `Scope<llvm::Function *>` specialization implementation for
the `DOTGraphTraits`.
2025-01-15 11:54:28 +01:00
Andrea Gussoni db719a23be ScopeGraph: delete Scope(&&) constructor
Delete the `Scope(const GraphType &&)` constructor, in order to avoid
potential bugs due to the storage of a temporary reference in the `const
GraphType &Graph` member.
2025-01-15 11:54:28 +01:00
Andrea Gussoni 684cbf649a ScopeGraph: implement Inverse<Scope<>>
Implement the `Inverse<Scope<...>>` `GraphTraits`. This are needed in
order to support the computation of the `PostDominatorTree` on a
`ScopeGraph`.

Add some `FileCheck` tests to test the dominator and postdominator trees
on the `ScopeGraph`.
2025-01-15 11:48:28 +01:00
Pietro Fezzardi f81bbcc754 Add new EagerMaterializationRangeIterator
Introduce the `EagerMaterializationRangeIterator`, which substitutes the
`GeneratorIterator`, and is used to materialize the successors of a
node in the `ScopeGraph`.

In addition, remove the `GeneratorIterator`.
2025-01-15 11:48:28 +01:00
Andrea Gussoni fa69bd24e5 ScopeGraph: introduce the ScopeGraph
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`.
2024-12-05 15:43:57 +01:00