Jlm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
jlm::llvm::TruncOperation Class Referencefinal

#include <ConversionOperations.hpp>

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

Public Member Functions

 ~TruncOperation () noexcept override
 
 TruncOperation (const std::shared_ptr< const rvsdg::BitType > &operandType, const std::shared_ptr< const rvsdg::BitType > &resultType)
 
 TruncOperation (std::shared_ptr< const rvsdg::Type > operandType, std::shared_ptr< const rvsdg::Type > resultType)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
size_t nsrcbits () const noexcept
 
size_t ndstbits () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::UnaryOperation
 ~UnaryOperation () noexcept override
 
 UnaryOperation (std::shared_ptr< const Type > operand, std::shared_ptr< const Type > result)
 
- 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 std::unique_ptr< ThreeAddressCodecreateTac (const Variable *operand, const std::shared_ptr< const rvsdg::Type > &resultType)
 
static rvsdg::SimpleNodecreateNode (rvsdg::Output &operand, std::shared_ptr< const rvsdg::Type > resultType)
 
static rvsdg::Outputcreate (size_t ndstbits, rvsdg::Output &operand)
 
static std::optional< std::vector< rvsdg::Output * > > foldConstant (const TruncOperation &operation, const std::vector< rvsdg::Output * > &operands)
 

Static Private Member Functions

static std::shared_ptr< const rvsdg::BitTypecheckBitType (const std::shared_ptr< const rvsdg::Type > &type)
 

Detailed Description

Definition at line 240 of file ConversionOperations.hpp.

Constructor & Destructor Documentation

◆ ~TruncOperation()

jlm::llvm::TruncOperation::~TruncOperation ( )
overridedefaultnoexcept

◆ TruncOperation() [1/2]

jlm::llvm::TruncOperation::TruncOperation ( const std::shared_ptr< const rvsdg::BitType > &  operandType,
const std::shared_ptr< const rvsdg::BitType > &  resultType 
)
inline

Definition at line 245 of file ConversionOperations.hpp.

◆ TruncOperation() [2/2]

jlm::llvm::TruncOperation::TruncOperation ( std::shared_ptr< const rvsdg::Type operandType,
std::shared_ptr< const rvsdg::Type resultType 
)
inline

Definition at line 254 of file ConversionOperations.hpp.

Member Function Documentation

◆ checkBitType()

static std::shared_ptr< const rvsdg::BitType > jlm::llvm::TruncOperation::checkBitType ( const std::shared_ptr< const rvsdg::Type > &  type)
inlinestaticprivate

Definition at line 315 of file ConversionOperations.hpp.

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 142 of file ConversionOperations.cpp.

◆ create()

static rvsdg::Output & jlm::llvm::TruncOperation::create ( size_t  ndstbits,
rvsdg::Output operand 
)
inlinestatic

Definition at line 295 of file ConversionOperations.hpp.

◆ createNode()

static rvsdg::SimpleNode & jlm::llvm::TruncOperation::createNode ( rvsdg::Output operand,
std::shared_ptr< const rvsdg::Type resultType 
)
inlinestatic

Definition at line 289 of file ConversionOperations.hpp.

◆ createTac()

static std::unique_ptr< ThreeAddressCode > jlm::llvm::TruncOperation::createTac ( const Variable operand,
const std::shared_ptr< const rvsdg::Type > &  resultType 
)
inlinestatic

Definition at line 282 of file ConversionOperations.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 136 of file ConversionOperations.cpp.

◆ foldConstant()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::TruncOperation::foldConstant ( const TruncOperation operation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Performs constant folding by statically evaluating the constant operand and replacing the operations result with the resulting constant.

Parameters
operationThe TruncOperation on which the transformation is performed.
operandsThe operands of the TruncOperation node.
Returns
If the normalization could be applied, then the result of the TruncOperation after the transformation. Otherwise, std::nullopt.

Definition at line 148 of file ConversionOperations.cpp.

◆ ndstbits()

size_t jlm::llvm::TruncOperation::ndstbits ( ) const
inlinenoexcept

Definition at line 276 of file ConversionOperations.hpp.

◆ nsrcbits()

size_t jlm::llvm::TruncOperation::nsrcbits ( ) const
inlinenoexcept

Definition at line 270 of file ConversionOperations.hpp.

◆ operator==()

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

Definition at line 129 of file ConversionOperations.cpp.


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