Commit Graph

7 Commits

Author SHA1 Message Date
Alessandro Di Federico dcc795c424 Drop Logger's StaticEnabled feature 2025-10-31 14:49:05 +01:00
Andrea Gussoni 2ba365bc45 DAGify: fix Head election
During the `Head` election phase, we now introduce the following
additional criterion:
When processing a `GenericRegion` nested into an outer one (its
`ParentRegion`), if the inner `Region` contains the block that has been
elected as `Head` of the `ParentRegion`, we also force that block to be
the `Head` of the inner `GenericRegion`.

We add a unit test to check this behavior.
2025-09-24 15:51:06 +02:00
Andrea Gussoni 71988af041 Fix MIT license 2025-04-30 16:10:54 +02:00
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