Jlm
remove-redundant-buf.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2021 David Metz <david.c.metz@ntnu.no>
3  * See COPYING for terms of redistribution.
4  */
5 
6 #ifndef JLM_BACKEND_HLS_RVSDG2RHLS_REMOVE_REDUNDANT_BUF_HPP
7 #define JLM_BACKEND_HLS_RVSDG2RHLS_REMOVE_REDUNDANT_BUF_HPP
8 
10 
11 namespace jlm::rvsdg
12 {
13 class Output;
14 class Region;
15 }
16 
17 namespace jlm::hls
18 {
19 
29 {
30 public:
31  ~RedundantBufferElimination() noexcept override;
32 
35  {}
36 
37  void
38  Run(rvsdg::RvsdgModule & module, util::StatisticsCollector & statisticsCollector) override;
39 
40  static void
41  CreateAndRun(rvsdg::RvsdgModule & module, util::StatisticsCollector & statisticsCollector);
42 
43 private:
44  static void
45  HandleRegion(rvsdg::Region & region);
46 
47  [[nodiscard]] static bool
48  CanTraceToLoadOrStore(const rvsdg::Output & output);
49 };
50 
51 }
52 
53 #endif // JLM_BACKEND_HLS_RVSDG2RHLS_REMOVE_REDUNDANT_BUF_HPP
static void HandleRegion(rvsdg::Region &region)
~RedundantBufferElimination() noexcept override
static bool CanTraceToLoadOrStore(const rvsdg::Output &output)
static void CreateAndRun(rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector)
void Run(rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector) override
Perform RVSDG transformation.
Represent acyclic RVSDG subgraphs.
Definition: region.hpp:213
Represents an RVSDG transformation.