LLVM
8.0.1
|
#include "Bitcode/Reader/ValueList.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 () |
Once all constants are read, this method bulk resolves any forward references. More... | |
Definition at line 29 of file ValueList.h.
|
inline |
Definition at line 44 of file ValueList.h.
|
inline |
Definition at line 46 of file ValueList.h.
References assert().
Definition at line 69 of file ValueList.cpp.
References llvm::Value::deleteValue(), and llvm::size().
Referenced by shrinkTo().
|
inline |
Definition at line 65 of file ValueList.h.
|
inline |
Definition at line 55 of file ValueList.h.
References assert().
|
inline |
Definition at line 67 of file ValueList.h.
Definition at line 97 of file ValueList.cpp.
References C, Context, llvm::report_fatal_error(), and llvm::size().
Referenced by shrinkTo().
Definition at line 113 of file ValueList.cpp.
References llvm::max(), and llvm::size().
Referenced by readTriple(), and shrinkTo().
Definition at line 60 of file ValueList.h.
References assert().
|
inline |
Definition at line 66 of file ValueList.h.
|
inline |
Definition at line 53 of file ValueList.h.
|
inline |
Definition at line 52 of file ValueList.h.
void BitcodeReaderValueList::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 144 of file ValueList.cpp.
References assert(), llvm::SmallVectorImpl< T >::clear(), llvm::Constant::destroyConstant(), E, llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::ConstantVector::get(), I, llvm::lower_bound(), llvm::User::op_begin(), llvm::User::op_end(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::Value::replaceAllUsesWith(), llvm::sort(), and llvm::Value::user_begin().
Referenced by shrinkTo().
|
inline |
Definition at line 69 of file ValueList.h.
References assert(), assignValue(), getConstantFwdRef(), getValueFwdRef(), resolveConstantForwardRefs(), and size().
|
inline |
Definition at line 51 of file ValueList.h.
Referenced by shrinkTo().