Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Value

96     SmallVector<Value*, 32> DeadInsts;
320 bool CanConvertToScalar(Value *V, uint64_t Offset, Value* NonConstantIdx);
323 void ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, uint64_t Offset,
324 Value *NonConstantIdx);
326 Value *ConvertScalar_ExtractValue(Value *NV, Type *ToType,
327 uint64_t Offset, Value* NonConstantIdx,
329 Value *ConvertScalar_InsertValue(Value *StoredVal, Value *ExistingVal,
330 uint64_t Offset, Value* NonConstantIdx,
473 /// If we see at least one access to the value that is as a vector type, set the
475 bool ConvertToScalarInfo::CanConvertToScalar(Value *V, uint64_t Offset,
476 Value* NonConstantIdx) {
493 // Storing the pointer, not into the value?
518 SmallVector<Value*, 8> Indices(GEP->op_begin()+1, GEP->op_end());
519 Value *GEPNonConstantIdx = nullptr;
541 // If this is a constant sized memset of a constant value (e.g. 0) we can
547 // Store of constant value.
604 void ConvertToScalarInfo::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI,
606 Value* NonConstantIdx) {
618 SmallVector<Value*, 8> Indices(GEP->op_begin()+1, GEP->op_end());
619 Value* GEPNonConstantIdx = nullptr;
637 Value *LoadedVal = Builder.CreateLoad(NewAI);
638 Value *NewLoadVal
649 Value *New = ConvertScalar_InsertValue(SI->getOperand(0), Old, Offset,
661 // If this is a constant sized memset of a constant value (e.g. 0) we can
662 // transform it into a store of the expanded constant value.
671 // Compute the value replicated the right number of times.
674 // Splat the value if non-zero.
680 Value *New = ConvertScalar_InsertValue(
709 Value *SrcPtr = MTI->getSource();
733 Value *DstPtr = Builder.CreateBitCast(MTI->getDest(), AIPTy);
759 /// ConvertScalar_ExtractValue - Extract a value of type ToType from an integer
760 /// or vector value FromVal, extracting the bits from the offset specified by
761 /// Offset. This returns the value, which is of type ToType.
769 Value *ConvertToScalarInfo::
770 ConvertScalar_ExtractValue(Value *FromVal, Type *ToType,
771 uint64_t Offset, Value* NonConstantIdx,
794 Value *Idx;
804 Value *V = Builder.CreateExtractElement(FromVal, Idx);
816 Value *Res = UndefValue::get(ST);
818 Value *Elt = ConvertScalar_ExtractValue(FromVal, ST->getElementType(i),
830 Value *Res = UndefValue::get(AT);
832 Value *Elt = ConvertScalar_ExtractValue(FromVal, AT->getElementType(),
840 // Otherwise, this must be a union that was converted to an integer value.
891 /// ConvertScalar_InsertValue - Insert the value "SV" into the existing integer
892 /// or vector value "Old" at the offset specified by Offset.
901 /// NonConstantIdx is an index value if there was a GEP with a non-constant
902 /// index value. If this is 0 then all GEPs used to find this insert address
904 Value *ConvertToScalarInfo::
905 ConvertScalar_InsertValue(Value *SV, Value *Old,
906 uint64_t Offset, Value* NonConstantIdx,
928 Value *Idx;
941 // If SV is a first-class aggregate value, insert each value recursively.
947 Value *Elt = Builder.CreateExtractValue(SV, i);
960 Value *Elt = Builder.CreateExtractValue(SV, i);
978 // Zero extend or truncate the value if needed.
1016 // Mask out the bits we are about to insert from the old value, and or
1106 Value *Arg = nullptr;
1214 Value *InVal = PN->getIncomingValue(i);
1221 // If the value is produced by the terminator of the predecessor
1267 Value *Result = SI->getOperand(1+CI->isZero());
1350 Value *V = Builder.CreateSelect(SI->getCondition(), TrueLoad, FalseLoad);
1508 // value cannot be decomposed at all.
1526 // If we can turn this aggregate value (potentially with casts) into a
1527 // simple scalar value that can be mem2reg'd into a register value.
1744 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
1885 for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI!=E;) {
1929 Value *Insert = UndefValue::get(LIType);
1932 Value *Load = Builder.CreateLoad(NewElts[i], "load");
1947 Value *Val = SI->getOperand(0);
1960 Value *Extract = Builder.CreateExtractValue(Val, i, Val->getName());
2060 SmallVector<Value*, 8> Indices(GEPI->op_begin() + 1, GEPI->op_end());
2065 Value* NonConstantIdx = nullptr;
2088 SmallVector<Value*, 8> NewArgs;
2137 Value *V = Builder.CreateBitCast(NewElts[Idx], Builder.getInt8PtrTy(AS));
2183 // memset, this Value* stays null.
2184 Value *OtherPtr = nullptr;
2213 for (SmallVectorImpl<Value *>::const_iterator I = DeadInsts.begin(),
2237 Value *OtherElt = nullptr;
2241 Value *Idx[2] = { Zero,
2264 Value *EltPtr = NewElts[i];
2272 Value *Elt = new LoadInst(OtherElt, "tmp", false, OtherEltAlign, MI);
2276 Value *Elt = new LoadInst(EltPtr, "tmp", MI);
2293 // Construct an integer with the right value.
2303 // Convert the integer value to the appropriate type.
2311 // If the requested value was a vector constant, create it.
2336 Value *Dst = SROADest ? EltPtr : OtherElt; // Dest ptr
2337 Value *Src = SROADest ? OtherElt : EltPtr; // Src ptr
2355 // and store the element value to the individual alloca.
2356 Value *SrcVal = SI->getOperand(0);
2377 // Get the number of bits to shift SrcVal to get the value.
2384 Value *EltVal = SrcVal;
2386 Value *ShiftVal = ConstantInt::get(EltVal->getType(), Shift);
2399 Value *DestField = NewElts[i];
2430 Value *EltVal = SrcVal;
2432 Value *ShiftVal = ConstantInt::get(EltVal->getType(), Shift);
2441 Value *DestField = NewElts[i];
2466 value.
2471 // and form the result value.
2490 Value *ResultVal =
2494 // Load the value from the alloca. If the NewElt is an aggregate, cast
2496 Value *SrcField = NewElts[i];
2534 Value *ShiftVal = ConstantInt::get(SrcField->getType(), Shift);