My Project
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::memoir::FoldInst Struct Reference
Inheritance diagram for llvm::memoir::FoldInst:
llvm::memoir::AccessInst llvm::memoir::MemOIRInst

Public Types

using iterator = ClosedKeyword::iterator
 
using operand_iterator = ClosedKeyword::operand_iterator
 
using const_iterator = ClosedKeyword::const_iterator
 
using const_operand_iterator = ClosedKeyword::const_operand_iterator
 
- Public Types inherited from llvm::memoir::AccessInst
using index_iterator = llvm::User::value_op_iterator
 
using const_index_iterator = llvm::User::const_value_op_iterator
 
using index_op_iterator = llvm::User::op_iterator
 
using const_index_op_iterator = llvm::User::const_op_iterator
 

Public Member Functions

llvm::Value & getResult () const
 
bool isReverse () const
 
llvm::Value & getInitial () const
 
llvm::Use & getInitialAsUse () const
 
llvm::Value & getObject () const override
 
llvm::Use & getObjectAsUse () const override
 
llvm::Function & getBody () const
 
llvm::Value & getBodyOperand () const
 
llvm::Use & getBodyOperandAsUse () const
 
std::optional< ClosedKeywordgetClosed () const
 
llvm::iterator_range< iterator > closed ()
 
iterator closed_begin ()
 
iterator closed_end ()
 
llvm::iterator_range< operand_iterator > closed_operands ()
 
operand_iterator closed_ops_begin ()
 
operand_iterator closed_ops_end ()
 
llvm::iterator_range< const_iterator > closed () const
 
const_iterator closed_begin () const
 
const_iterator closed_end () const
 
llvm::iterator_range< const_operand_iterator > closed_operands () const
 
const_operand_iterator closed_ops_begin () const
 
const_operand_iterator closed_ops_end () const
 
llvm::Argument & getAccumulatorArgument () const
 
llvm::Argument & getIndexArgument () const
 
llvm::Argument * getElementArgument () const
 
llvm::Argument * getClosedArgument (llvm::Use &use) const
 
llvm::Use * getOperandForArgument (llvm::Argument &arg) const
 
std::string toString () const override
 
- Public Member Functions inherited from llvm::memoir::AccessInst
TypegetObjectType () const
 
TypegetElementType () const
 
llvm::iterator_range< index_iterator > indices ()
 
index_iterator indices_begin ()
 
index_iterator indices_end ()
 
llvm::iterator_range< const_index_iterator > indices () const
 
const_index_iterator indices_begin () const
 
const_index_iterator indices_end () const
 
llvm::iterator_range< index_op_iterator > index_operands ()
 
index_op_iterator index_operands_begin ()
 
index_op_iterator index_operands_end ()
 
llvm::iterator_range< const_index_op_iterator > index_operands () const
 
const_index_op_iterator index_operands_begin () const
 
const_index_op_iterator index_operands_end () const
 
Option< size_t > match_offsets (llvm::ArrayRef< unsigned > offsets) const
 
- Public Member Functions inherited from llvm::memoir::MemOIRInst
llvm::Function & getCalledFunction () const
 
llvm::Module * getModule () const
 
llvm::Function * getFunction () const
 
llvm::BasicBlock * getParent () const
 
llvm::CallInst & getCallInst () const
 
llvm::Value & asValue () const
 
MemOIR_Func getKind () const
 
bool has_keywords () const
 
template<typename KeywordTy >
std::optional< KeywordTy > get_keyword () const
 
llvm::iterator_range< keyword_iteratorkeywords () const
 
keyword_iterator kw_begin () const
 
keyword_iterator kw_end () const
 
 operator llvm::Value * ()
 
 operator llvm::Value & ()
 
 operator llvm::Instruction * ()
 
 operator llvm::Instruction & ()
 

Static Public Member Functions

static FoldInstget_single_fold (llvm::Function &func)
 
static bool classof (const MemOIRInst *I)
 
- Static Public Member Functions inherited from llvm::memoir::AccessInst
static bool classof (const MemOIRInst *I)
 
- Static Public Member Functions inherited from llvm::memoir::MemOIRInst
static MemOIRInstget (llvm::Instruction &I)
 
static bool is_mutator (MemOIRInst &I)
 
static void invalidate ()
 

Protected Member Functions

 FoldInst (llvm::CallInst &call_inst)
 
- Protected Member Functions inherited from llvm::memoir::AccessInst
 AccessInst (llvm::CallInst &call_inst)
 
- Protected Member Functions inherited from llvm::memoir::MemOIRInst
 MemOIRInst (llvm::CallInst &call_inst)
 

Friends

struct MemOIRInst
 

Additional Inherited Members

- Protected Attributes inherited from llvm::memoir::MemOIRInst
llvm::CallInst & call_inst
 
- Static Protected Attributes inherited from llvm::memoir::MemOIRInst
static Map< llvm::Instruction *, MemOIRInst * > * llvm_to_memoir = nullptr
 

Member Function Documentation

◆ get_single_fold()

FoldInst * llvm::memoir::FoldInst::get_single_fold ( llvm::Function &  func)
static

Finds the single fold user of this function, if it exists.

Parameters
functhe LLVM function
Returns
the single fold, or NULL if none was found.

◆ getAccumulatorArgument()

llvm::Argument & llvm::memoir::FoldInst::getAccumulatorArgument ( ) const

Get the argument corresponding to the accumulator value.

◆ getClosedArgument()

llvm::Argument * llvm::memoir::FoldInst::getClosedArgument ( llvm::Use &  use) const

Get the corresponding argument in the fold function for the given closed use.

Parameters
usethe use of the closed value
Returns
the corresponding argument, NULL if the use is not closed on.

◆ getElementArgument()

llvm::Argument * llvm::memoir::FoldInst::getElementArgument ( ) const

Get the argument corresponding to the element value, if it exists. NOTE: if the collection being folded over has void element type, this will not exist.

Returns
the argument, or NULL if it does not exist.

◆ getIndexArgument()

llvm::Argument & llvm::memoir::FoldInst::getIndexArgument ( ) const

Get the argument corresponding to the index value.

◆ getOperandForArgument()

llvm::Use * llvm::memoir::FoldInst::getOperandForArgument ( llvm::Argument &  arg) const

Fetch the operand use that will be passed to the given argument.

Parameters
argthe argument
Returns
the operand use corresponding to the argument

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