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

#include <Load.hpp>

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

Public Member Functions

 ~LoadVolatileOperation () noexcept override
 
 LoadVolatileOperation (std::shared_ptr< const rvsdg::Type > loadedType, size_t numMemoryStates, size_t alignment)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
- Public Member Functions inherited from jlm::llvm::LoadOperation
size_t GetAlignment () const noexcept
 
std::shared_ptr< const rvsdg::TypeGetLoadedType () const noexcept
 
size_t NumMemoryStates () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::SimpleOperation
 ~SimpleOperation () noexcept override
 
 SimpleOperation (std::vector< std::shared_ptr< const jlm::rvsdg::Type >> operands, std::vector< std::shared_ptr< const jlm::rvsdg::Type >> results)
 
size_t narguments () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & argument (size_t index) const noexcept
 
size_t nresults () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & result (size_t index) const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::Operation
virtual ~Operation () noexcept
 
virtual bool operator== (const Operation &other) const noexcept=0
 
bool operator!= (const Operation &other) const noexcept
 

Static Public Member Functions

static rvsdg::InputIOStateInput (const rvsdg::Node &node) noexcept
 
static rvsdg::OutputIOStateOutput (const rvsdg::Node &node)
 
static std::unique_ptr< llvm::ThreeAddressCodeCreate (const Variable *address, const Variable *iOState, const Variable *memoryState, std::shared_ptr< const rvsdg::Type > loadedType, size_t alignment)
 
static rvsdg::SimpleNodeCreateNode (rvsdg::Region &region, std::unique_ptr< LoadVolatileOperation > loadOperation, const std::vector< rvsdg::Output * > &operands)
 
static rvsdg::SimpleNodeCreateNode (rvsdg::Output &address, rvsdg::Output &iOState, const std::vector< rvsdg::Output * > &memoryStates, std::shared_ptr< const rvsdg::Type > loadedType, size_t alignment)
 
- Static Public Member Functions inherited from jlm::llvm::LoadOperation
static rvsdg::InputAddressInput (const rvsdg::Node &node) noexcept
 
static rvsdg::OutputLoadedValueOutput (const rvsdg::Node &node)
 
static rvsdg::Node::OutputIteratorRange MemoryStateOutputs (const rvsdg::Node &node) noexcept
 
static rvsdg::Node::InputIteratorRange MemoryStateInputs (const rvsdg::Node &node) noexcept
 
static rvsdg::InputMapMemoryStateOutputToInput (const rvsdg::Output &output)
 
static rvsdg::OutputmapMemoryStateInputToOutput (const rvsdg::Input &input)
 

Static Private Member Functions

static std::vector< std::shared_ptr< const rvsdg::Type > > CreateOperandTypes (size_t numMemoryStates)
 
static std::vector< std::shared_ptr< const rvsdg::Type > > CreateResultTypes (std::shared_ptr< const rvsdg::Type > loadedType, size_t numMemoryStates)
 

Additional Inherited Members

- Protected Member Functions inherited from jlm::llvm::LoadOperation
 LoadOperation (const std::vector< std::shared_ptr< const rvsdg::Type >> &operandTypes, const std::vector< std::shared_ptr< const rvsdg::Type >> &resultTypes, const size_t numMemoryStates, const size_t alignment)
 

Detailed Description

Represents a volatile LLVM load instruction.

In contrast to LLVM, a volatile load requires in an RVSDG setting an I/O state as it incorporates externally visible side-effects. This I/O state allows the volatile load operation to be sequentialized with respect to other volatile memory accesses and I/O operations. This additional I/O state is the main reason why volatile loads are modeled as its own operation and volatile is not just a flag at the normal LoadNonVolatileOperation.

See also
StoreVolatileOperation

Definition at line 184 of file Load.hpp.

Constructor & Destructor Documentation

◆ ~LoadVolatileOperation()

jlm::llvm::LoadVolatileOperation::~LoadVolatileOperation ( )
overridedefaultnoexcept

◆ LoadVolatileOperation()

jlm::llvm::LoadVolatileOperation::LoadVolatileOperation ( std::shared_ptr< const rvsdg::Type loadedType,
size_t  numMemoryStates,
size_t  alignment 
)
inline

Definition at line 189 of file Load.hpp.

Member Function Documentation

◆ copy()

std::unique_ptr< rvsdg::Operation > jlm::llvm::LoadVolatileOperation::copy ( ) const
overridevirtual

Implements jlm::rvsdg::Operation.

Definition at line 384 of file Load.cpp.

◆ Create()

static std::unique_ptr<llvm::ThreeAddressCode> jlm::llvm::LoadVolatileOperation::Create ( const Variable address,
const Variable iOState,
const Variable memoryState,
std::shared_ptr< const rvsdg::Type loadedType,
size_t  alignment 
)
inlinestatic

Definition at line 228 of file Load.hpp.

◆ CreateNode() [1/2]

static rvsdg::SimpleNode& jlm::llvm::LoadVolatileOperation::CreateNode ( rvsdg::Output address,
rvsdg::Output iOState,
const std::vector< rvsdg::Output * > &  memoryStates,
std::shared_ptr< const rvsdg::Type loadedType,
size_t  alignment 
)
inlinestatic

Definition at line 246 of file Load.hpp.

◆ CreateNode() [2/2]

rvsdg::SimpleNode & jlm::llvm::LoadVolatileOperation::CreateNode ( rvsdg::Region region,
std::unique_ptr< LoadVolatileOperation loadOperation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Definition at line 390 of file Load.cpp.

◆ CreateOperandTypes()

static std::vector<std::shared_ptr<const rvsdg::Type> > jlm::llvm::LoadVolatileOperation::CreateOperandTypes ( size_t  numMemoryStates)
inlinestaticprivate

Definition at line 265 of file Load.hpp.

◆ CreateResultTypes()

static std::vector<std::shared_ptr<const rvsdg::Type> > jlm::llvm::LoadVolatileOperation::CreateResultTypes ( std::shared_ptr< const rvsdg::Type loadedType,
size_t  numMemoryStates 
)
inlinestaticprivate

Definition at line 277 of file Load.hpp.

◆ debug_string()

std::string jlm::llvm::LoadVolatileOperation::debug_string ( ) const
overridevirtual

Implements jlm::rvsdg::Operation.

Definition at line 378 of file Load.cpp.

◆ IOStateInput()

static rvsdg::Input& jlm::llvm::LoadVolatileOperation::IOStateInput ( const rvsdg::Node node)
inlinestaticnoexcept

Definition at line 210 of file Load.hpp.

◆ IOStateOutput()

static rvsdg::Output& jlm::llvm::LoadVolatileOperation::IOStateOutput ( const rvsdg::Node node)
inlinestatic

Definition at line 219 of file Load.hpp.

◆ operator==()

bool jlm::llvm::LoadVolatileOperation::operator== ( const Operation &  other) const
overridenoexcept

Definition at line 369 of file Load.cpp.


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