18 Commits

Author SHA1 Message Date
Alessandro Di Federico c883bed765 Drop Logger's StaticEnabled feature 2025-10-31 17:25:03 +01:00
Ivan Krysak 3561c2b907 Adopt IRBuilder wrapper 2025-10-21 19:17:01 +03:00
Andrea Gussoni 855a9309ec MaterializeLoopScopes: drop pass
Drop the `MaterializeLoopScopes` pass after the re-design the loop
matching stage to work entirely on `clift`, without the need to insert a
`scope_closer` edge to guide the emission.

Simultaneously, drop the DAGify `Head` metadata insertion, since it will
not be checked anymore during the `MaterializeLoopScopes` pass.
2025-09-26 10:39:09 +02:00
Andrea Gussoni 92e8ec3982 ScopeGraphUtils: improve isDAG check
We now ensure that even in case of blocks disconnected from the entry,
the `isDAG` function still search for loops in such parts of the graph.

This is achieved by instantiating multiple `scc_iterator` on the blocks
composing the underlying `Graph`.
2025-09-26 10:39:09 +02:00
Andrea Gussoni 46fe7415ca DAGify: assert no disconnected blocks 2025-09-24 15:51:06 +02: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 0281dbe040 DAGify: insert Head metadata 2025-09-10 13:36:09 +02:00
Andrea Gussoni 7965fa3039 DAGify: implement abnormal entry normalization
Perform the abnormal (late) entries normalization in the DAGify pass.

In this way, we are exploiting the information computed by
`GenericRegionInfo` as close as possible to where it is computed the
first time (in DAGify).

Actualize the unit tests to reflect these changes.
2025-09-10 13:36:09 +02:00
Andrea Gussoni c0b9e3b425 DAGify: rename Logger 2025-09-10 13:36:08 +02:00
Andrea Gussoni 4143187942 DAGify: Logger typo 2025-09-10 13:36:08 +02:00
Andrea Gussoni 95ecd2d519 DAGify: compute GenericRegionInfo on raw CFG
Compute the `GenericRegionInfo` analysis on the raw CFG and not on the
`ScopeGraph`.
2025-09-10 13:36:08 +02:00
Andrea Gussoni 4b4fe388cb DAGify: improve variable name 2025-09-10 13:36:08 +02:00
Andrea Gussoni cf7fba7beb DAGify: single ScopeGraphBuilder instance 2025-06-12 15:31:38 +02:00
Andrea Gussoni 71988af041 Fix MIT license 2025-04-30 16:10:54 +02:00
Andrea Gussoni c14c2d64dc DAGify: reorder FunctionPass method declarations 2025-04-02 16:47:14 +02:00
Andrea Gussoni 023807f0bb DAGify: remove useless llvm:: namespace 2025-04-02 16:47:14 +02:00
Andrea Gussoni f92db5d4a6 DAGify: use the makeGotoEdge helper 2025-04-02 16:47:14 +02:00
Andrea Gussoni 93f4a620dd DAGify: implement the DAGify pass
Implement the DAGify pass. This pass, using the results exposed by the
`GenericRegionInfo` analysis, transforms all the retreating edges of
each identified `GenericRegion`, processed in a bottom-up fashion, into
a `goto` edge on the `ScopeGraph`.
2025-03-11 12:26:36 +01:00