|
LLVM
4.0.0
|
#include <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 22 of file ValueList.h.
|
inline |
Definition at line 37 of file ValueList.h.
|
inline |
Definition at line 38 of file ValueList.h.
References assert().
Definition at line 52 of file ValueList.cpp.
References push_back(), resize(), and size().
|
inline |
Definition at line 57 of file ValueList.h.
|
inline |
Definition at line 47 of file ValueList.h.
References assert().
|
inline |
Definition at line 59 of file ValueList.h.
Definition at line 80 of file ValueList.cpp.
References C, llvm::report_fatal_error(), resize(), and size().
Definition at line 96 of file ValueList.cpp.
Definition at line 52 of file ValueList.h.
Referenced by resolveConstantForwardRefs().
|
inline |
Definition at line 58 of file ValueList.h.
|
inline |
Definition at line 45 of file ValueList.h.
Referenced by assignValue().
|
inline |
Definition at line 44 of file ValueList.h.
Referenced by assignValue(), getConstantFwdRef(), and getValueFwdRef().
| 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 127 of file ValueList.cpp.
References assert(), llvm::Constant::destroyConstant(), E, llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::ConstantVector::get(), I, llvm::User::op_begin(), llvm::User::op_end(), operator[](), and llvm::Value::replaceAllUsesWith().
|
inline |
Definition at line 61 of file ValueList.h.
|
inline |
Definition at line 43 of file ValueList.h.
Referenced by assignValue(), getConstantFwdRef(), getValueFwdRef(), and shrinkTo().
1.8.6