Jlm
pull.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Nico Reißmann <nico.reissmann@gmail.com>
3  * See COPYING for terms of redistribution.
4  */
5 
6 #ifndef JLM_LLVM_OPT_PULL_HPP
7 #define JLM_LLVM_OPT_PULL_HPP
8 
10 
11 namespace jlm::rvsdg
12 {
13 class GammaNode;
14 class Region;
15 }
16 
17 namespace jlm::llvm
18 {
19 
23 class NodeSinking final : public rvsdg::Transformation
24 {
25 public:
26  class Statistics;
27 
28  ~NodeSinking() noexcept override;
29 
32  {}
33 
34  void
35  Run(rvsdg::RvsdgModule & module, util::StatisticsCollector & statisticsCollector) override;
36 
44  static size_t
46 
47 private:
55  collectDependentNodes(const rvsdg::Node & node);
56 
65  static std::vector<rvsdg::Node *>
67 };
68 
69 void
71 
72 void
73 pull(rvsdg::GammaNode * gamma);
74 
75 void
76 pull(rvsdg::Region * region);
77 
78 }
79 
80 #endif
Node Sinking Optimization.
Definition: pull.hpp:24
static std::vector< rvsdg::Node * > sortByDepth(const util::HashSet< rvsdg::Node * > &nodes)
Definition: pull.cpp:187
static util::HashSet< rvsdg::Node * > collectDependentNodes(const rvsdg::Node &node)
Definition: pull.cpp:161
void Run(rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector) override
Perform RVSDG transformation.
Definition: pull.cpp:398
static size_t sinkDependentNodesIntoGamma(rvsdg::GammaNode &gammaNode)
Definition: pull.cpp:215
~NodeSinking() noexcept override
Conditional operator / pattern matching.
Definition: gamma.hpp:99
Represent acyclic RVSDG subgraphs.
Definition: region.hpp:213
Represents an RVSDG transformation.
Transformation(std::string_view Name)
Global memory state passed between functions.
void pullin_top(rvsdg::GammaNode *gamma)
Definition: pull.cpp:134
void pull(rvsdg::GammaNode *gamma)
Definition: pull.cpp:325