Commit Graph

4 Commits

Author SHA1 Message Date
Andrea Gussoni d5b26a9346 GenericRegion: add support for ScopeGraph
Add the needed support for running `GenericRegionInfo` on the
`ScopeGraph`.

This needs a new ad-hoc `getGenericCycleInfo` helper in order to unwrap
the `Graph` object (pointing to the underlying `Function *`) from the
`Scope` wrapper object.
2025-03-11 12:25:24 +01:00
Andrea Gussoni 3499d10154 GenericRegion: remove retreatings edges
Remove retreating edges from the `GenericRegion` class, and the
collection of them in `GenericRegionInfo`.
2025-03-11 12:25:24 +01:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Andrea Gussoni 76cb852c28 Implement GenericRegionInfo
We implement the `GenericRegionInfo` analysis.

The analysis accepts a template parameter which enables to run it on
every graph which exposes `llvm::GraphTraits`.
The `GenericRegionPass` is responsible for instantiating and running the
analysis on a `llvm::Function`.

The `GenericRegionInfo` analysis uses, and takes insipiration from the
`GenericCycleInfo` LLVM analysis.

The analysis exposes a tree of well nested `GenericRegion`s, which are
constructed starting from the well nested tree of `GenericCycle`s.
In addition, we perform the election of the `Head` of each
`GenericRegion`, and the election of the retreating edges.
2024-09-19 18:11:19 +02:00