13#ifndef LLVM_LIB_BITCODE_READER_VALUELIST_H
14#define LLVM_LIB_BITCODE_READER_VALUELIST_H
30 std::vector<std::pair<WeakTrackingVH, unsigned>> ValuePtrs;
34 unsigned RefsUpperBound;
36 using MaterializeValueFnTy =
37 std::function<Expected<Value *>(
unsigned,
BasicBlock *)>;
38 MaterializeValueFnTy MaterializeValueFn;
42 MaterializeValueFnTy MaterializeValueFn)
45 MaterializeValueFn(MaterializeValueFn) {}
48 unsigned size()
const {
return ValuePtrs.size(); }
53 ValuePtrs.emplace_back(V,
TypeID);
61 assert(i < ValuePtrs.size());
62 return ValuePtrs[i].first;
66 assert(ValNo < ValuePtrs.size());
67 return ValuePtrs[ValNo].second;
70 Value *
back()
const {
return ValuePtrs.back().first; }
74 bool empty()
const {
return ValuePtrs.empty(); }
82 assert(ValNo < ValuePtrs.size());
83 ValuePtrs[ValNo].first = NewV;
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Basic Block Representation.
BitcodeReaderValueList(size_t RefsUpperBound, MaterializeValueFnTy MaterializeValueFn)
Value * getValueFwdRef(unsigned Idx, Type *Ty, unsigned TyID, BasicBlock *ConstExprInsertBB)
Value * operator[](unsigned i) const
void push_back(Value *V, unsigned TypeID)
void replaceValueWithoutRAUW(unsigned ValNo, Value *NewV)
Error assignValue(unsigned Idx, Value *V, unsigned TypeID)
void shrinkTo(unsigned N)
unsigned getTypeID(unsigned ValNo) const
Lightweight error class with error context and mandatory checking.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
Implement std::hash so that hash_code can be used in STL containers.