|
Jlm
|
#include <LoopUnswitching.hpp>


Classes | |
| class | Statistics |
Public Member Functions | |
| ~LoopUnswitching () noexcept override | |
| LoopUnswitching (std::shared_ptr< const LoopUnswitchingHeuristic > heuristic) | |
| void | Run (rvsdg::RvsdgModule &rvsdgModule, util::StatisticsCollector &statisticsCollector) override |
| Perform RVSDG transformation. More... | |
Public Member Functions inherited from jlm::rvsdg::Transformation | |
| virtual | ~Transformation () noexcept |
| Transformation (std::string_view Name) | |
| const std::string_view & | GetName () const noexcept |
| void | Run (RvsdgModule &module) |
| Perform RVSDG transformation. More... | |
Static Public Member Functions | |
| static void | CreateAndRun (rvsdg::RvsdgModule &rvsdgModule, util::StatisticsCollector &statisticsCollector, std::shared_ptr< const LoopUnswitchingHeuristic > heuristic) |
Private Member Functions | |
| void | HandleRegion (rvsdg::Region ®ion) |
| bool | UnswitchLoop (rvsdg::ThetaNode &thetaNode) |
Static Private Member Functions | |
| static rvsdg::GammaNode * | IsUnswitchable (const rvsdg::ThetaNode &thetaNode) |
| static void | SinkNodesIntoGamma (rvsdg::GammaNode &gammaNode, const rvsdg::ThetaNode &thetaNode) |
| static std::vector< std::vector< rvsdg::Node * > > | CollectPredicateNodes (const rvsdg::ThetaNode &thetaNode, const rvsdg::GammaNode &gammaNode) |
| static void | CopyPredicateNodes (rvsdg::Region &target, rvsdg::SubstitutionMap &substitutionMap, const std::vector< std::vector< rvsdg::Node * >> &nodes) |
| static bool | allLoopVarsAreRoutedThroughGamma (const rvsdg::ThetaNode &thetaNode, const rvsdg::GammaNode &gammaNode) |
Private Attributes | |
| std::shared_ptr< const LoopUnswitchingHeuristic > | heuristic_ |
Loop unswitching transforms a theta node with a gamma node in its subregion to a gamma node that contains a theta node in one of its subregions, avoiding the conditional in every loop iteration.
| theta |
|---|
| P |
| -—|— | | | | | | | —|-----------------------------------------------— |
| gamma | ||||
|---|---|---|---|---|
| X | R | |||
| _________________________ | __________________________ |
| | | |__|____________________________________________________________|
to the following graph: P | -—|---------------------------------------------------------— | gamma | | | | ----------------------------------— |
| theta | |||
|---|---|---|---|
| R | |||
| P |
| | | | | | | | |_____|_____________________________| | | | | |______________________|________________________________________|
*X*
where
The predicate subgraph P is duplicated as part of the transformation.
Definition at line 107 of file LoopUnswitching.hpp.
|
overridedefaultnoexcept |
|
inlineexplicit |
Definition at line 114 of file LoopUnswitching.hpp.
|
staticprivate |
Checks that the post-values from all loop variables are originating from gammaNode.
| thetaNode | The theta node for which to perform the check. |
| gammaNode | The gamma node through which all loop variables need to be routed. |
gammaNode, otherwise false. Definition at line 187 of file LoopUnswitching.cpp.
|
staticprivate |
Definition at line 150 of file LoopUnswitching.cpp.
|
staticprivate |
Definition at line 174 of file LoopUnswitching.cpp.
|
static |
Definition at line 400 of file LoopUnswitching.cpp.
|
private |
Definition at line 358 of file LoopUnswitching.cpp.
|
staticprivate |
Definition at line 84 of file LoopUnswitching.cpp.
|
overridevirtual |
Perform RVSDG transformation.
| module | RVSDG module the transformation is performed on. |
| statisticsCollector | Statistics collector for collecting transformation statistics. |
Implements jlm::rvsdg::Transformation.
Definition at line 386 of file LoopUnswitching.cpp.
|
staticprivate |
Definition at line 130 of file LoopUnswitching.cpp.
|
private |
Definition at line 202 of file LoopUnswitching.cpp.
|
private |
Definition at line 162 of file LoopUnswitching.hpp.