|
LLVM
10.0.0
|
#include "Bitcode/Reader/ValueList.h"
Public Member Functions | |
| BitcodeReaderValueList (LLVMContext &C, size_t RefsUpperBound) | |
| ~BitcodeReaderValueList () | |
| unsigned | size () const |
| void | resize (unsigned N) |
| void | push_back (Value *V, Type *Ty) |
| 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, Type **FullTy=nullptr) |
| void | assignValue (Value *V, unsigned Idx, Type *FullTy) |
| void | resolveConstantForwardRefs () |
| Once all constants are read, this method bulk resolves any forward references. More... | |
Definition at line 28 of file ValueList.h.
|
inline |
Definition at line 54 of file ValueList.h.
|
inline |
Definition at line 59 of file ValueList.h.
References assert().
Definition at line 68 of file ValueList.cpp.
References assert(), llvm::Value::deleteValue(), and llvm::size().
Referenced by shrinkTo().
|
inline |
Definition at line 85 of file ValueList.h.
|
inline |
Definition at line 74 of file ValueList.h.
References assert().
|
inline |
Definition at line 90 of file ValueList.h.
Definition at line 99 of file ValueList.cpp.
References C, Context, llvm::report_fatal_error(), and llvm::size().
Referenced by shrinkTo().
Definition at line 80 of file ValueList.h.
References assert().
|
inline |
Definition at line 86 of file ValueList.h.
Definition at line 69 of file ValueList.h.
|
inline |
Definition at line 65 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 153 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 92 of file ValueList.h.
References assert(), assignValue(), getConstantFwdRef(), getValueFwdRef(), resolveConstantForwardRefs(), and size().
|
inline |
Definition at line 64 of file ValueList.h.
Referenced by shrinkTo().
1.8.13