Commit Graph

14 Commits

Author SHA1 Message Date
Pietro Fezzardi 00169c5833 Switch to new cmake package for revamb libraries
This change makes `CMakeLists.txt` files less verbose and allows proper
registration of debug `Logger`s from revamb `Support` library,
enabling their use without manually enabling them.
This also means that they can be properly enabled with command line
arguments and that we can remove some hacks in the code that was put in
place to work around this limitation.
2019-01-22 19:16:48 +01:00
Andrea Gussoni 05a5d80151 Short-circuit simplification concept
First concept of short-circuit simplification.
The `isEqual` operator between ASTNodes is very limited (it does only
check if two nodes originate from the same `BasicBlock` in the original
IR.
2019-01-22 19:16:48 +01:00
Andrea Gussoni 8f89ea0f7d Outline not reachable nodes removal
Outlined the removal of nodes not reachable from the entry node in an
external function. This is useful to reuse the function not only for the
main graph, but also for the collapsed regions.
In this way we can remove not reachable nodes in the inner regions, such
as dandling `break` and `continue` nodes (found in an endless loop).
2019-01-21 18:28:59 +01:00
Andrea Gussoni f94bd7d99a Refresh backedges after each transformation
This fix enables the correct updating of the backedges present in the
graph, since each transformation pass could in principle modify some of
the backedges present in the graph
2019-01-21 18:28:59 +01:00
Andrea Gussoni 5245cd71e5 Added assertions
Added more asserts to quickly identify problems in which we already
incurred
2019-01-17 17:29:39 +01:00
Andrea Gussoni c9ca88c12f Improved debugging information
Enriched the debuggin information provided by the logger, and also
manually enabled it, until `opt` will accept additional command line
parameters
2019-01-17 17:27:33 +01:00
Andrea Gussoni d6ba63aa71 Fix SCS successor node connection
If no `exit dispatcher` has been created, connect the possible unique
successor to the SCS collapsed node
2019-01-17 17:25:11 +01:00
Andrea Gussoni b0d3190c4c Moved the getID method to the CFG class
Moved the creation of unique IDs inside the CFG object, in such a way
that we do not need a global function and variable anymore
2019-01-17 17:23:58 +01:00
Andrea Gussoni b08da2c045 Serializing CFGs to file 2019-01-17 17:05:10 +01:00
Andrea Gussoni 46aafe13fc Avoid absorption of nodes already in other SCS
We now avoid the absorption of some successor node in a metaregion, if
such node is already part of another processed metaregion, to avoid
breaking the nested structure of the metaregions.
2019-01-16 14:56:39 +01:00
Pietro Fezzardi da299f3095 EnforceCFGCombingPass: inject dummy nodes in CFG 2019-01-16 12:53:08 +01:00
Pietro Fezzardi 5805679ead RestructureCFGPass: fix use of include directory 2019-01-15 16:57:15 +01:00
Andrea Gussoni b66774bcd2 Connect the successor of an SCS only once
In case we do not emit an exit dispatcher, take care of connecting the
successor of a SCS only once.
2019-01-14 15:45:08 +01:00
Andrea Gussoni 06717a6185 Import RestructureCFGPass from revamb branch
Import the RestructureCFGPass from the `feature/the-comb` branch on the
`revamb` repository.
2019-01-14 15:45:08 +01:00