Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Value

199 template <> struct isPodLike<Slice> { static const bool value = true; };
596 static Value *foldSelectInst(SelectInst &SI) {
597 // If the condition being selected on is a constant or the same value is
609 static Value *foldPHINodeOrSelectInst(Instruction &I) {
611 // If PN merges together the same value, return that value.
723 // inbounds, then the result of the GEP is a poison value and we can
756 Value *ValOp = SI.getValueOperand();
832 // Check for the special case where the same exact value is used for both
913 Value *Op = SI->getOperand(0);
949 if (Value *Result = foldPHINodeOrSelectInst(I)) {
1179 Value *InVal = PN.getIncomingValue(Idx);
1181 // If the value is produced by the terminator of the predecessor (an
1232 Value *InVal = PN.getIncomingValue(Idx);
1262 Value *TValue = SI.getTrueValue();
1263 Value *FValue = SI.getFalseValue();
1291 Value *TV = SI.getTrueValue();
1292 Value *FV = SI.getFalseValue();
1316 Value *V = IRB.CreateSelect(SI.getCondition(), TL, FL,
1330 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr,
1331 SmallVectorImpl<Value *> &Indices, Twine NamePrefix) {
1353 static Value *getNaturalGEPWithType(IRBuilderTy &IRB, const DataLayout &DL,
1354 Value *BasePtr, Type *Ty, Type *TargetTy,
1355 SmallVectorImpl<Value *> &Indices,
1397 static Value *getNaturalGEPRecursively(IRBuilderTy &IRB, const DataLayout &DL,
1398 Value *Ptr, Type *Ty, APInt &Offset,
1400 SmallVectorImpl<Value *> &Indices,
1471 static Value *getNaturalGEPWithOffset(IRBuilderTy &IRB, const DataLayout &DL,
1472 Value *Ptr, APInt Offset, Type *TargetTy,
1473 SmallVectorImpl<Value *> &Indices,
1511 static Value *getAdjustedPtr(IRBuilderTy &IRB, const DataLayout &DL, Value *Ptr,
1515 SmallPtrSet<Value *, 4> Visited;
1517 SmallVector<Value *, 4> Indices;
1522 Value *OffsetPtr = nullptr;
1523 Value *OffsetBasePtr;
1527 Value *Int8Ptr = nullptr;
1546 if (Value *P = getNaturalGEPWithOffset(IRB, DL, Ptr, Offset, TargetTy,
1626 /// \brief Test whether we can convert a value from the old to the new type.
1631 /// underlying value, and convert that value.
1666 /// \brief Generic routine to convert an SSA value to a value of a different
1672 static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
1675 assert(canConvertValue(DL, OldTy, NewTy) && "Value not convertable to type");
1797 /// SSA value. We only can ensure this for a limited set of operations, and we
2028 static Value *extractInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
2034 "Element extends past full value");
2051 static Value *insertInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *Old,
2052 Value *V, uint64_t Offset, const Twine &Name) {
2082 static Value *extractVector(IRBuilderTy &IRB, Value *V, unsigned BeginIndex,
2108 static Value *insertVector(IRBuilderTy &IRB, Value *Old, Value *V,
2288 Value *getNewAllocaSlicePtr(IRBuilderTy &IRB, Type *PointerTy) {
2348 void deleteIfTriviallyDead(Value *V) {
2354 Value *rewriteVectorizedLoadInst() {
2359 Value *V = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(), "load");
2363 Value *rewriteIntegerLoad(LoadInst &LI) {
2366 Value *V = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(), "load");
2388 Value *OldOp = LI.getOperand(0);
2395 Value *V;
2446 // Create a placeholder value with the same type as LI to use as the
2447 // basis for the new value. This allows us to replace the uses of LI with
2448 // the computed value, and then replace the placeholder with LI, leaving
2450 Value *Placeholder =
2467 bool rewriteVectorizedStoreInst(Value *V, StoreInst &SI, Value *OldOp) {
2481 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(), "load");
2492 bool rewriteIntegerStore(Value *V, StoreInst &SI) {
2496 Value *Old =
2513 Value *OldOp = SI.getOperand(1);
2516 Value *V = SI.getValueOperand();
2550 // value prior to storing.
2564 Value *NewPtr = getNewAllocaSlicePtr(IRB, V->getType()->getPointerTo());
2577 /// \brief Compute an integer value from splatting an i8 across the given
2584 /// \param V The i8 value to splat.
2586 Value *getIntegerSplat(Value *V, unsigned Size) {
2589 assert(VTy->getBitWidth() == 8 && "Expected an i8 value for the byte");
2604 /// \brief Compute a vector splat for a given element value.
2605 Value *getVectorSplat(Value *V, unsigned NumElements) {
2635 // a single value type, just emit a memset.
2652 // If we can represent this as a simple value, we have to build the actual
2653 // value to store, which requires expanding the byte present in memset to
2657 Value *V;
2669 Value *Splat =
2675 Value *Old =
2688 Value *Old =
2710 Value *New = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment(),
2737 Value *AdjustedPtr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
2760 // a single value type, just emit a memcpy.
2785 Value *OtherPtr = IsDest ? II.getRawSource() : II.getRawDest();
2808 Value *OurPtr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
2844 Value *SrcPtr = getAdjustedPtr(IRB, DL, OtherPtr, OtherOffset, OtherPtrTy,
2847 Value *DstPtr = &NewAI;
2854 Value *Src;
2869 Value *Old =
2873 Value *Old =
2900 Value *Ptr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
2901 Value *New;
2928 Value *NewPtr = getNewAllocaSlicePtr(PtrBuilder, OldPtr->getType());
2930 std::replace(PN.op_begin(), PN.op_end(), cast<Value>(OldPtr), NewPtr);
2949 Value *NewPtr = getNewAllocaSlicePtr(IRB, OldPtr->getType());
2984 /// value (as opposed to the user).
3019 /// appropriate value within the aggregate.
3023 SmallVector<Value *, 4> GEPIndices;
3026 Value *Ptr;
3030 OpSplitter(Instruction *InsertionPoint, Value *Ptr)
3037 /// scalar or vector ops. It splits recursively until it hits a single value
3038 /// and emits that single value operation via the template argument.
3045 /// \param Agg The aggregate value being built up or stored, depending on
3047 void emitSplitOps(Type *Ty, Value *&Agg, const Twine &Name) {
3086 LoadOpSplitter(Instruction *InsertionPoint, Value *Ptr)
3089 /// Emit a leaf load of a single value. This is called at the leaves of the
3091 void emitFunc(Type *Ty, Value *&Agg, const Twine &Name) {
3093 // Load the single value and insert it using the indices.
3094 Value *GEP =
3096 Value *Load = IRB.CreateLoad(GEP, Name + ".load");
3110 Value *V = UndefValue::get(LI.getType());
3118 StoreOpSplitter(Instruction *InsertionPoint, Value *Ptr)
3121 /// Emit a leaf store of a single value. This is called at the leaves of the
3123 void emitFunc(Type *Ty, Value *&Agg, const Twine &Name) {
3125 // Extract the single value and store it using the indices.
3126 Value *Store = IRB.CreateStore(
3137 Value *V = SI.getValueOperand();
3542 // the value operand to one of the stores.
3616 Value *StoreBasePtr = SI->getPointerOperand();
3679 Value *LoadBasePtr = LI->getPointerOperand();
3808 /// to rewrite uses of an alloca partition to be conducive for SSA value
4059 /// \brief Clobber a use with undef, deleting the used value if it becomes dead.
4061 Value *OldV = U;
4062 // Replace the use with an undef value.