Jlm
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
jlm::hls::BaseHLS Class Referenceabstract

#include <base-hls.hpp>

Inheritance diagram for jlm::hls::BaseHLS:
Inheritance graph
[legend]

Public Member Functions

virtual ~BaseHLS ()
 
std::string run (llvm::LlvmRvsdgModule &rm)
 

Static Public Member Functions

static int JlmSize (const jlm::rvsdg::Type *type)
 

Protected Member Functions

std::string get_node_name (const rvsdg::Node *node)
 
const rvsdg::LambdaNodeget_hls_lambda (llvm::LlvmRvsdgModule &rm)
 
void create_node_names (rvsdg::Region *r)
 
virtual std::string GetText (llvm::LlvmRvsdgModule &rm)=0
 
std::vector< rvsdg::RegionArgument * > get_mem_resps (const rvsdg::LambdaNode &lambda)
 
std::vector< rvsdg::RegionResult * > get_mem_reqs (const rvsdg::LambdaNode &lambda)
 
std::vector< rvsdg::RegionArgument * > get_reg_args (const rvsdg::LambdaNode &lambda)
 
std::vector< rvsdg::RegionResult * > get_reg_results (const rvsdg::LambdaNode &lambda)
 

Static Protected Member Functions

static std::string get_port_name (jlm::rvsdg::Input *port)
 
static std::string get_port_name (jlm::rvsdg::Output *port)
 
static std::string get_base_file_name (const llvm::LlvmRvsdgModule &rm)
 

Protected Attributes

std::unordered_map< const rvsdg::Node *, std::string > node_map
 
std::unordered_map< jlm::rvsdg::Output *, std::string > output_map
 

Private Member Functions

virtual std::string extension ()=0
 

Detailed Description

Definition at line 22 of file base-hls.hpp.

Constructor & Destructor Documentation

◆ ~BaseHLS()

jlm::hls::BaseHLS::~BaseHLS ( )
virtualdefault

Member Function Documentation

◆ create_node_names()

void jlm::hls::BaseHLS::create_node_names ( rvsdg::Region r)
protected

Definition at line 116 of file base-hls.cpp.

◆ extension()

virtual std::string jlm::hls::BaseHLS::extension ( )
privatepure virtual

◆ get_base_file_name()

std::string jlm::hls::BaseHLS::get_base_file_name ( const llvm::LlvmRvsdgModule rm)
staticprotected

Definition at line 151 of file base-hls.cpp.

◆ get_hls_lambda()

const jlm::rvsdg::LambdaNode * jlm::hls::BaseHLS::get_hls_lambda ( llvm::LlvmRvsdgModule rm)
protected

Definition at line 136 of file base-hls.cpp.

◆ get_mem_reqs()

std::vector<rvsdg::RegionResult *> jlm::hls::BaseHLS::get_mem_reqs ( const rvsdg::LambdaNode lambda)
inlineprotected

Extracts all region results of the given kernel that represent memory requests. They can take multiple values within a single execution of the region.

Parameters
lambdathe lambda node holding the hls kernel
Returns
the results that represent memory requests

Definition at line 93 of file base-hls.hpp.

◆ get_mem_resps()

std::vector<rvsdg::RegionArgument *> jlm::hls::BaseHLS::get_mem_resps ( const rvsdg::LambdaNode lambda)
inlineprotected

Extracts all region arguments of the given kernel that represent memory responses. They can provide multiple values within a single execution of the region.

Parameters
lambdathe lambda node holding the hls kernel
Returns
the arguments that represent memory responses

Definition at line 75 of file base-hls.hpp.

◆ get_node_name()

std::string jlm::hls::BaseHLS::get_node_name ( const rvsdg::Node node)
protected

Definition at line 28 of file base-hls.cpp.

◆ get_port_name() [1/2]

std::string jlm::hls::BaseHLS::get_port_name ( jlm::rvsdg::Input port)
staticprotected

Definition at line 62 of file base-hls.cpp.

◆ get_port_name() [2/2]

std::string jlm::hls::BaseHLS::get_port_name ( jlm::rvsdg::Output port)
staticprotected

Definition at line 82 of file base-hls.cpp.

◆ get_reg_args()

std::vector<rvsdg::RegionArgument *> jlm::hls::BaseHLS::get_reg_args ( const rvsdg::LambdaNode lambda)
inlineprotected

Extracts all region arguments of the given kernel that represent kernel inputs, which may include kernel arguments, state types, and context variables (always in that order). It will not return any arguments that represent memory responses.

Parameters
lambdathe lambda node holding the hls kernel
Returns
the arguments of the lambda that represent kernel inputs

Definition at line 112 of file base-hls.hpp.

◆ get_reg_results()

std::vector<rvsdg::RegionResult *> jlm::hls::BaseHLS::get_reg_results ( const rvsdg::LambdaNode lambda)
inlineprotected

Extracts all region results from the given kernel that represent results from execution, as opposed to results used for making memory requests.

Parameters
lambdathe lambda node holding the hls kernel
Returns
the results of the lambda that represent the kernel outputs

Definition at line 130 of file base-hls.hpp.

◆ GetText()

virtual std::string jlm::hls::BaseHLS::GetText ( llvm::LlvmRvsdgModule rm)
protectedpure virtual

◆ JlmSize()

int jlm::hls::BaseHLS::JlmSize ( const jlm::rvsdg::Type type)
static

Definition at line 110 of file base-hls.cpp.

◆ run()

std::string jlm::hls::BaseHLS::run ( llvm::LlvmRvsdgModule rm)
inline

Definition at line 28 of file base-hls.hpp.

Member Data Documentation

◆ node_map

std::unordered_map<const rvsdg::Node *, std::string> jlm::hls::BaseHLS::node_map
protected

Definition at line 44 of file base-hls.hpp.

◆ output_map

std::unordered_map<jlm::rvsdg::Output *, std::string> jlm::hls::BaseHLS::output_map
protected

Definition at line 45 of file base-hls.hpp.


The documentation for this class was generated from the following files: