LLVM API Documentation
#include <BitcodeReader.h>
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, Type *Ty) |
| Value * | getValueFwdRef (unsigned Idx, Type *Ty) |
| void | AssignValue (Value *V, unsigned Idx) |
| void | ResolveConstantForwardRefs () |
Definition at line 38 of file BitcodeReader.h.
| llvm::BitcodeReaderValueList::BitcodeReaderValueList | ( | LLVMContext & | C | ) | [inline] |
Definition at line 52 of file BitcodeReader.h.
Definition at line 53 of file BitcodeReader.h.
| void BitcodeReaderValueList::AssignValue | ( | Value * | V, |
| unsigned | Idx | ||
| ) |
Definition at line 293 of file BitcodeReader.cpp.
References push_back(), resize(), and size().
| Value* llvm::BitcodeReaderValueList::back | ( | ) | const [inline] |
Definition at line 74 of file BitcodeReader.h.
| void llvm::BitcodeReaderValueList::clear | ( | ) | [inline] |
Definition at line 64 of file BitcodeReader.h.
Referenced by llvm::BitcodeReader::FreeState().
| bool llvm::BitcodeReaderValueList::empty | ( | ) | const [inline] |
Definition at line 76 of file BitcodeReader.h.
| Constant * BitcodeReaderValueList::getConstantFwdRef | ( | unsigned | Idx, |
| Type * | Ty | ||
| ) |
Definition at line 322 of file BitcodeReader.cpp.
References llvm::CallingConv::C, resize(), and size().
| Value * BitcodeReaderValueList::getValueFwdRef | ( | unsigned | Idx, |
| Type * | Ty | ||
| ) |
Definition at line 338 of file BitcodeReader.cpp.
Definition at line 69 of file BitcodeReader.h.
Referenced by ResolveConstantForwardRefs().
| void llvm::BitcodeReaderValueList::pop_back | ( | ) | [inline] |
Definition at line 75 of file BitcodeReader.h.
| void llvm::BitcodeReaderValueList::push_back | ( | Value * | V | ) | [inline] |
Definition at line 60 of file BitcodeReader.h.
Referenced by AssignValue().
| void llvm::BitcodeReaderValueList::resize | ( | unsigned | N | ) | [inline] |
Definition at line 59 of file BitcodeReader.h.
Referenced by AssignValue(), getConstantFwdRef(), and getValueFwdRef().
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 363 of file BitcodeReader.cpp.
References llvm::Constant::destroyConstant(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::ConstantVector::get(), I, llvm::User::op_begin(), llvm::User::op_end(), operator[](), and llvm::Value::replaceAllUsesWith().
| void llvm::BitcodeReaderValueList::shrinkTo | ( | unsigned | N | ) | [inline] |
Definition at line 77 of file BitcodeReader.h.
References size().
| unsigned llvm::BitcodeReaderValueList::size | ( | ) | const [inline] |
Definition at line 58 of file BitcodeReader.h.
Referenced by AssignValue(), getConstantFwdRef(), getValueFwdRef(), and shrinkTo().