diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-16 13:13:08 +0000 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-16 13:13:08 +0000 |
commit | 86cda9e0506c21910edd0504309dcb028bb867cb (patch) | |
tree | 7fcc023e24f7fff191c914812f274d87f3f4df07 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | ac5bc8a3ddcdbdf3ed697be90048105f301dd779 (diff) | |
download | bcm5719-llvm-86cda9e0506c21910edd0504309dcb028bb867cb.tar.gz bcm5719-llvm-86cda9e0506c21910edd0504309dcb028bb867cb.zip |
Pass around Instruction* instead of Instruction& in FindInsertedValue and friends.
llvm-svn: 52318
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index a3eb82d62b8..64cdc246b91 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -764,7 +764,7 @@ bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) { Value *BuildSubAggregate(Value *From, Value* To, const Type *IndexedType, SmallVector<unsigned, 10> &Idxs, unsigned IdxSkip, - Instruction &InsertBefore) { + Instruction *InsertBefore) { const llvm::StructType *STy = llvm::dyn_cast<llvm::StructType>(IndexedType); if (STy) { // General case, the type indexed by Idxs is a struct @@ -782,11 +782,11 @@ Value *BuildSubAggregate(Value *From, Value* To, const Type *IndexedType, // IdxSkip indices when indexing the sub struct). Instruction *V = llvm::ExtractValueInst::Create(From, Idxs.begin(), Idxs.end(), "tmp", - &InsertBefore); + InsertBefore); Instruction *Ins = llvm::InsertValueInst::Create(To, V, Idxs.begin() + IdxSkip, Idxs.end(), "tmp", - &InsertBefore); + InsertBefore); return Ins; } } @@ -804,7 +804,7 @@ Value *BuildSubAggregate(Value *From, Value* To, const Type *IndexedType, // // Any inserted instructions are inserted before InsertBefore Value *BuildSubAggregate(Value *From, const unsigned *idx_begin, - const unsigned *idx_end, Instruction &InsertBefore) { + const unsigned *idx_end, Instruction *InsertBefore) { const Type *IndexedType = ExtractValueInst::getIndexedType(From->getType(), idx_begin, idx_end); @@ -819,7 +819,7 @@ Value *BuildSubAggregate(Value *From, const unsigned *idx_begin, /// the scalar value indexed is already around as a register, for example if it /// were inserted directly into the aggregrate. Value *llvm::FindInsertedValue(Value *V, const unsigned *idx_begin, - const unsigned *idx_end, Instruction &InsertBefore) { + const unsigned *idx_end, Instruction *InsertBefore) { // Nothing to index? Just return V then (this is useful at the end of our // recursion) if (idx_begin == idx_end) |