Jlm
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
jlm::llvm::LlvmGraphImport Class Referencefinal

#include <RvsdgModule.hpp>

Inheritance diagram for jlm::llvm::LlvmGraphImport:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::LlvmGraphImport:
Collaboration graph
[legend]

Public Member Functions

size_t getAlignment () const noexcept
 
const Linkagelinkage () const noexcept
 
const CallingConventioncallingConvention () const noexcept
 
bool isConstant () const noexcept
 
const std::shared_ptr< const jlm::rvsdg::Type > & ValueType () const noexcept
 
const std::shared_ptr< const jlm::rvsdg::Type > & ImportedType () const noexcept
 
LlvmGraphImportCopy (rvsdg::Region &region, rvsdg::StructuralInput *input) const override
 
- Public Member Functions inherited from jlm::rvsdg::GraphImport
 GraphImport (Graph &graph, std::shared_ptr< const rvsdg::Type > type, std::string name)
 
const std::string & Name () const noexcept
 
std::string debug_string () const override
 
GraphImportCopy (Region &region, StructuralInput *input) const override
 
- Public Member Functions inherited from jlm::rvsdg::RegionArgument
 ~RegionArgument () noexcept override
 
 RegionArgument (rvsdg::Region *region, StructuralInput *input, std::shared_ptr< const rvsdg::Type > type)
 
 RegionArgument (const RegionArgument &)=delete
 
 RegionArgument (RegionArgument &&)=delete
 
RegionArgumentoperator= (const RegionArgument &)=delete
 
RegionArgumentoperator= (RegionArgument &&)=delete
 
std::string debug_string () const override
 
StructuralInputinput () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::Output
virtual ~Output () noexcept
 
 Output (const Output &)=delete
 
 Output (Output &&)=delete
 
Outputoperator= (const Output &)=delete
 
Outputoperator= (Output &&)=delete
 
size_t index () const noexcept
 
size_t nusers () const noexcept
 
bool IsDead () const noexcept
 
void divert_users (jlm::rvsdg::Output *new_origin)
 
template<typename F >
size_t divertUsersWhere (Output &newOrigin, const F &match)
 
rvsdg::InputSingleUser () noexcept
 
UsersRange Users ()
 
UsersConstRange Users () const
 
const std::shared_ptr< const rvsdg::Type > & Type () const noexcept
 
rvsdg::Regionregion () const noexcept
 
std::variant< Node *, Region * > GetOwner () const noexcept
 

Static Public Member Functions

static LlvmGraphImportcreate (rvsdg::Graph &graph, std::shared_ptr< const rvsdg::Type > valueType, std::shared_ptr< const rvsdg::Type > importedType, std::string name, Linkage linkage, CallingConvention callingConvention, const bool isConstant, const size_t alignment)
 
static LlvmGraphImportcreateGlobalImport (rvsdg::Graph &graph, std::shared_ptr< const rvsdg::Type > valueType, std::shared_ptr< const rvsdg::Type > importedType, std::string name, Linkage linkage, const bool isConstant, const size_t alignment)
 
static LlvmGraphImportcreateFunctionImport (rvsdg::Graph &graph, std::shared_ptr< const rvsdg::FunctionType > functionType, std::string name, Linkage linkage, CallingConvention callingConvention)
 
- Static Public Member Functions inherited from jlm::rvsdg::GraphImport
static GraphImportCreate (Graph &graph, std::shared_ptr< const rvsdg::Type > type, std::string name)
 
- Static Public Member Functions inherited from jlm::rvsdg::RegionArgument
static RegionArgumentCreate (rvsdg::Region &region, StructuralInput *input, std::shared_ptr< const rvsdg::Type > type)
 Creates region entry argument. More...
 

Private Member Functions

 LlvmGraphImport (rvsdg::Graph &graph, std::shared_ptr< const rvsdg::Type > valueType, std::shared_ptr< const rvsdg::Type > importedType, std::string name, Linkage linkage, CallingConvention callingConvention, const bool isConstant, const size_t alignment)
 

Private Attributes

std::shared_ptr< const rvsdg::TypeValueType_
 
std::shared_ptr< const rvsdg::TypeImportedType_
 
llvm::Linkage Linkage_
 
CallingConvention callingConvention_
 
bool isConstant_
 
size_t alignment_
 

Additional Inherited Members

- Public Types inherited from jlm::rvsdg::RegionArgument
typedef util::IntrusiveListAccessor< RegionArgument, &RegionArgument::structural_input_anchor_structural_input_accessor
 
- Public Types inherited from jlm::rvsdg::Output
using UsersList = Input::UsersList
 
using UsersRange = jlm::util::IteratorRange< UsersList::Iterator >
 
using UsersConstRange = jlm::util::IteratorRange< UsersList::ConstIterator >
 
- Protected Member Functions inherited from jlm::rvsdg::Output
 Output (Node &owner, std::shared_ptr< const rvsdg::Type > type)
 
 Output (Region *owner, std::shared_ptr< const rvsdg::Type > type)
 

Detailed Description

Represents an import into the RVSDG of an external entity. It is used to model LLVM module declarations.

Definition at line 22 of file RvsdgModule.hpp.

Constructor & Destructor Documentation

◆ LlvmGraphImport()

jlm::llvm::LlvmGraphImport::LlvmGraphImport ( rvsdg::Graph graph,
std::shared_ptr< const rvsdg::Type valueType,
std::shared_ptr< const rvsdg::Type importedType,
std::string  name,
Linkage  linkage,
CallingConvention  callingConvention,
const bool  isConstant,
const size_t  alignment 
)
inlineprivate

Definition at line 24 of file RvsdgModule.hpp.

Member Function Documentation

◆ callingConvention()

const CallingConvention& jlm::llvm::LlvmGraphImport::callingConvention ( ) const
inlinenoexcept

The calling convention of the imported symbol. Only applies to imported functions, not global variables.

Returns
the calling convention of the imported function.

Definition at line 61 of file RvsdgModule.hpp.

◆ Copy()

LlvmGraphImport & jlm::llvm::LlvmGraphImport::Copy ( rvsdg::Region region,
rvsdg::StructuralInput input 
) const
overridevirtual

Makes a copy of this LlvmGraphImport in the given region.

Parameters
regionthe region to create the copy in. Must be a root region.
inputmust be nullptr
Returns
the created copy

Reimplemented from jlm::rvsdg::RegionArgument.

Definition at line 13 of file RvsdgModule.cpp.

◆ create()

static LlvmGraphImport& jlm::llvm::LlvmGraphImport::create ( rvsdg::Graph graph,
std::shared_ptr< const rvsdg::Type valueType,
std::shared_ptr< const rvsdg::Type importedType,
std::string  name,
Linkage  linkage,
CallingConvention  callingConvention,
const bool  isConstant,
const size_t  alignment 
)
inlinestatic

Definition at line 109 of file RvsdgModule.hpp.

◆ createFunctionImport()

static LlvmGraphImport& jlm::llvm::LlvmGraphImport::createFunctionImport ( rvsdg::Graph graph,
std::shared_ptr< const rvsdg::FunctionType functionType,
std::string  name,
Linkage  linkage,
CallingConvention  callingConvention 
)
inlinestatic

Creates a new graph import representing an imported function.

Parameters
graphthe graph whose root region will contain the import as an argument
functionTypethe type of the function, which is also the type of the argument
namethe name of the function symbol
linkagethe linkage of the function symbol
callingConventionthe calling convention of the function

Definition at line 172 of file RvsdgModule.hpp.

◆ createGlobalImport()

static LlvmGraphImport& jlm::llvm::LlvmGraphImport::createGlobalImport ( rvsdg::Graph graph,
std::shared_ptr< const rvsdg::Type valueType,
std::shared_ptr< const rvsdg::Type importedType,
std::string  name,
Linkage  linkage,
const bool  isConstant,
const size_t  alignment 
)
inlinestatic

Creates a new graph import representing a global variable.

Parameters
graphthe graph whose root region will contain the import as an argument
valueTypethe underlying type of the global variable
importedTypethe reference type used to access the global variable (e.g. PointerType)
namethe name of the global variable symbol
linkagethe linkage of the global variable symbol
isConstanttrue if the global variable is constant memory
alignmentthe alignment of the global variable

Definition at line 143 of file RvsdgModule.hpp.

◆ getAlignment()

size_t jlm::llvm::LlvmGraphImport::getAlignment ( ) const
inlinenoexcept

Definition at line 44 of file RvsdgModule.hpp.

◆ ImportedType()

const std::shared_ptr<const jlm::rvsdg::Type>& jlm::llvm::LlvmGraphImport::ImportedType ( ) const
inlinenoexcept

Symbols are imported as references to an underlying function or global variable. The imported type is the type of this reference, e.g., a pointer or function type. The imported type is the actual type of the RVSDG region argument.

Returns
the type used to reference the imported symbol.
See also
ValueType

Definition at line 94 of file RvsdgModule.hpp.

◆ isConstant()

bool jlm::llvm::LlvmGraphImport::isConstant ( ) const
inlinenoexcept

Definition at line 67 of file RvsdgModule.hpp.

◆ linkage()

const Linkage& jlm::llvm::LlvmGraphImport::linkage ( ) const
inlinenoexcept

Definition at line 50 of file RvsdgModule.hpp.

◆ ValueType()

const std::shared_ptr<const jlm::rvsdg::Type>& jlm::llvm::LlvmGraphImport::ValueType ( ) const
inlinenoexcept

Symbols are imported as references to an underlying function or global variable. The value type is the type of this underlying target.

Returns
the underlying type of the imported symbol
See also
ImportedType

Definition at line 80 of file RvsdgModule.hpp.

Member Data Documentation

◆ alignment_

size_t jlm::llvm::LlvmGraphImport::alignment_
private

Definition at line 196 of file RvsdgModule.hpp.

◆ callingConvention_

CallingConvention jlm::llvm::LlvmGraphImport::callingConvention_
private

Definition at line 194 of file RvsdgModule.hpp.

◆ ImportedType_

std::shared_ptr<const rvsdg::Type> jlm::llvm::LlvmGraphImport::ImportedType_
private

Definition at line 192 of file RvsdgModule.hpp.

◆ isConstant_

bool jlm::llvm::LlvmGraphImport::isConstant_
private

Definition at line 195 of file RvsdgModule.hpp.

◆ Linkage_

llvm::Linkage jlm::llvm::LlvmGraphImport::Linkage_
private

Definition at line 193 of file RvsdgModule.hpp.

◆ ValueType_

std::shared_ptr<const rvsdg::Type> jlm::llvm::LlvmGraphImport::ValueType_
private

Definition at line 191 of file RvsdgModule.hpp.


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