LLVM API Documentation

llvm::BitcodeReaderValueList Class Reference

#include <BitcodeReader.h>

Collaboration diagram for llvm::BitcodeReaderValueList:
[legend]

List of all members.

Public Member Functions

 BitcodeReaderValueList (LLVMContext &C)
 ~BitcodeReaderValueList ()
unsigned size () const
void resize (unsigned N)
void push_back (Value *V)
void clear ()
Value * operator[] (unsigned i) const
Value * back () const
void pop_back ()
bool empty () const
void shrinkTo (unsigned N)
Constant * getConstantFwdRef (unsigned Idx, const Type *Ty)
Value * getValueFwdRef (unsigned Idx, const Type *Ty)
void AssignValue (Value *V, unsigned Idx)
void ResolveConstantForwardRefs ()


Detailed Description

Definition at line 35 of file BitcodeReader.h.


Constructor & Destructor Documentation

llvm::BitcodeReaderValueList::BitcodeReaderValueList ( LLVMContext &  C  )  [inline]

Definition at line 49 of file BitcodeReader.h.

llvm::BitcodeReaderValueList::~BitcodeReaderValueList (  )  [inline]

Definition at line 50 of file BitcodeReader.h.


Member Function Documentation

unsigned llvm::BitcodeReaderValueList::size (  )  const [inline]

Definition at line 55 of file BitcodeReader.h.

Referenced by AssignValue(), getConstantFwdRef(), getValueFwdRef(), and shrinkTo().

void llvm::BitcodeReaderValueList::resize ( unsigned  N  )  [inline]

Definition at line 56 of file BitcodeReader.h.

Referenced by AssignValue(), getConstantFwdRef(), and getValueFwdRef().

void llvm::BitcodeReaderValueList::push_back ( Value *  V  )  [inline]

Definition at line 57 of file BitcodeReader.h.

Referenced by AssignValue().

void llvm::BitcodeReaderValueList::clear (  )  [inline]

Definition at line 61 of file BitcodeReader.h.

Referenced by llvm::BitcodeReader::FreeState().

Value* llvm::BitcodeReaderValueList::operator[] ( unsigned  i  )  const [inline]

Definition at line 66 of file BitcodeReader.h.

Referenced by ResolveConstantForwardRefs().

Value* llvm::BitcodeReaderValueList::back (  )  const [inline]

Definition at line 71 of file BitcodeReader.h.

void llvm::BitcodeReaderValueList::pop_back (  )  [inline]

Definition at line 72 of file BitcodeReader.h.

bool llvm::BitcodeReaderValueList::empty (  )  const [inline]

Definition at line 73 of file BitcodeReader.h.

void llvm::BitcodeReaderValueList::shrinkTo ( unsigned  N  )  [inline]

Definition at line 74 of file BitcodeReader.h.

References size().

Constant * BitcodeReaderValueList::getConstantFwdRef ( unsigned  Idx,
const Type *  Ty 
)

Definition at line 198 of file BitcodeReader.cpp.

References llvm::CallingConv::C, resize(), size(), and V.

Value * BitcodeReaderValueList::getValueFwdRef ( unsigned  Idx,
const Type *  Ty 
)

Definition at line 214 of file BitcodeReader.cpp.

References resize(), size(), and V.

void BitcodeReaderValueList::AssignValue ( Value *  V,
unsigned  Idx 
)

Definition at line 169 of file BitcodeReader.cpp.

References push_back(), resize(), and size().

void BitcodeReaderValueList::ResolveConstantForwardRefs (  ) 

ResolveConstantForwardRefs - Once all constants are read, this method bulk resolves any forward references.

ResolveConstantForwardRefs - Once all constants are read, this method bulk resolves any forward references. The idea behind this is that we sometimes get constants (such as large arrays) which reference *many* forward ref constants. Replacing each of these causes a lot of thrashing when building/reuniquing the constant. Instead of doing this, we look at all the uses and rewrite all the place holders at once for any constant that uses a placeholder.

Definition at line 239 of file BitcodeReader.cpp.

References llvm::Constant::destroyConstant(), E, llvm::ConstantStruct::get(), llvm::ConstantArray::get(), llvm::ConstantVector::get(), llvm::value_use_iterator< UserTy >::getUse(), llvm::User::op_begin(), llvm::User::op_end(), operator[](), llvm::Value::replaceAllUsesWith(), and llvm::Use::set().


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