Lines Matching refs:VPValue
216 DenseMap<VPValue *, PerPartValuesTy> PerPartOutput;
219 DenseMap<VPValue *, ScalarsPerPartValuesTy> PerPartScalars;
227 Value *get(VPValue *Def, unsigned Part);
230 Value *get(VPValue *Def, const VPIteration &Instance);
232 bool hasVectorValue(VPValue *Def, unsigned Part) { in hasVectorValue()
238 bool hasAnyVectorValue(VPValue *Def) const { in hasAnyVectorValue()
242 bool hasScalarValue(VPValue *Def, VPIteration Instance) { in hasScalarValue()
253 void set(VPValue *Def, Value *V, unsigned Part) { in set()
261 void reset(VPValue *Def, Value *V, unsigned Part) { in reset()
269 void set(VPValue *Def, Value *V, const VPIteration &Instance) { in set()
283 void reset(VPValue *Def, Value *V, const VPIteration &Instance) { in reset()
358 VPValue *getSingleOperandOrNull() { in getSingleOperandOrNull()
364 const VPValue *getSingleOperandOrNull() const { in getSingleOperandOrNull()
371 void resetSingleOpUser(VPValue *NewVal) { in resetSingleOpUser()
560 VPValue *getCondBit();
562 const VPValue *getCondBit() const;
564 void setCondBit(VPValue *CV);
567 VPValue *getPredicate();
569 const VPValue *getPredicate() const;
571 void setPredicate(VPValue *Pred);
586 VPValue *Condition) { in setTwoSuccessors()
628 virtual void dropAllReferences(VPValue *NewValue) = 0;
674 VPRecipeBase(const unsigned char SC, ArrayRef<VPValue *> Operands) in VPRecipeBase()
773 class VPInstruction : public VPRecipeBase, public VPValue {
801 VPInstruction(unsigned Opcode, ArrayRef<VPValue *> Operands) in VPInstruction()
803 VPValue(VPValue::VPVInstructionSC, nullptr, this), Opcode(Opcode) {} in VPInstruction()
807 VPValue(VPValue::VPVInstructionSC, nullptr, this), Opcode(Opcode) {
812 VPInstruction(unsigned Opcode, std::initializer_list<VPValue *> Operands) in VPInstruction()
813 : VPInstruction(Opcode, ArrayRef<VPValue *>(Operands)) {} in VPInstruction()
816 static inline bool classof(const VPValue *V) { in classof()
817 return V->getVPValueID() == VPValue::VPVInstructionSC; in classof()
821 SmallVector<VPValue *, 2> Operands(operands()); in clone()
878 class VPWidenRecipe : public VPRecipeBase, public VPValue {
883 VPValue(VPValue::VPVWidenSC, &I, this) {} in VPWidenRecipe()
891 static inline bool classof(const VPValue *V) { in classof()
892 return V->getVPValueID() == VPValue::VPVWidenSC; in classof()
906 class VPWidenCallRecipe : public VPRecipeBase, public VPValue {
912 VPValue(VPValue::VPVWidenCallSC, &I, this) {} in VPWidenCallRecipe()
932 class VPWidenSelectRecipe : public VPRecipeBase, public VPValue {
942 VPValue(VPValue::VPVWidenSelectSC, &I, this), in VPWidenSelectRecipe()
963 class VPWidenGEPRecipe : public VPRecipeBase, public VPValue {
971 VPValue(VPWidenGEPSC, GEP, this), in VPWidenGEPRecipe()
978 VPValue(VPValue::VPVWidenGEPSC, GEP, this), in VPWidenGEPRecipe()
1008 VPWidenIntOrFpInductionRecipe(PHINode *IV, VPValue *Start, Instruction *Cast,
1012 new VPValue(Trunc, this);
1014 new VPValue(IV, this);
1017 new VPValue(Cast, this);
1037 VPValue *getStartValue() { return getOperand(0); } in getStartValue()
1040 VPValue *getCastValue() { in getCastValue()
1061 class VPWidenPHIRecipe : public VPRecipeBase, public VPValue {
1067 VPValue *Start = nullptr)
1068 : VPRecipeBase(VPDefID, {}), VPValue(VPVID, Phi, this) {
1079 VPWidenPHIRecipe(PHINode *Phi, VPValue &Start) : VPWidenPHIRecipe(Phi) { in VPWidenPHIRecipe()
1091 static inline bool classof(const VPValue *V) { in classof()
1092 return V->getVPValueID() == VPValue::VPVWidenPHISC || in classof()
1093 V->getVPValueID() == VPValue::VPVFirstOrderRecurrencePHISC || in classof()
1094 V->getVPValueID() == VPValue::VPVReductionPHISC; in classof()
1108 VPValue *getStartValue() { in getStartValue()
1114 VPValue *getBackedgeValue() { in getBackedgeValue()
1125 void addIncoming(VPValue *IncomingV, VPBasicBlock *IncomingBlock) { in addIncoming()
1131 VPValue *getIncomingValue(unsigned I) { return getOperand(I); } in getIncomingValue()
1141 VPFirstOrderRecurrencePHIRecipe(PHINode *Phi, VPValue &Start) in VPFirstOrderRecurrencePHIRecipe()
1152 static inline bool classof(const VPValue *V) { in classof()
1153 return V->getVPValueID() == VPValue::VPVFirstOrderRecurrencePHISC; in classof()
1182 VPValue &Start, bool IsInLoop = false,
1195 static inline bool classof(const VPValue *V) { in classof()
1196 return V->getVPValueID() == VPValue::VPVReductionPHISC; in classof()
1222 class VPBlendRecipe : public VPRecipeBase, public VPValue {
1229 VPBlendRecipe(PHINode *Phi, ArrayRef<VPValue *> Operands) in VPBlendRecipe()
1231 VPValue(VPValue::VPVBlendSC, Phi, this), Phi(Phi) { in VPBlendRecipe()
1248 VPValue *getIncomingValue(unsigned Idx) const { return getOperand(Idx * 2); } in getIncomingValue()
1251 VPValue *getMask(unsigned Idx) const { return getOperand(Idx * 2 + 1); } in getMask()
1273 VPInterleaveRecipe(const InterleaveGroup<Instruction> *IG, VPValue *Addr, in VPInterleaveRecipe()
1274 ArrayRef<VPValue *> StoredValues, VPValue *Mask) in VPInterleaveRecipe()
1280 new VPValue(I, this);
1298 VPValue *getAddr() const { in getAddr()
1304 VPValue *getMask() const { in getMask()
1311 ArrayRef<VPValue *> getStoredValues() const { in getStoredValues()
1314 return ArrayRef<VPValue *>(op_begin(), getNumOperands()) in getStoredValues()
1333 class VPReductionRecipe : public VPRecipeBase, public VPValue {
1340 VPReductionRecipe(RecurrenceDescriptor *R, Instruction *I, VPValue *ChainOp, in VPReductionRecipe()
1341 VPValue *VecOp, VPValue *CondOp, in VPReductionRecipe()
1344 VPValue(VPValue::VPVReductionSC, I, this), RdxDesc(R), TTI(TTI) {
1352 static inline bool classof(const VPValue *V) { in classof()
1353 return V->getVPValueID() == VPValue::VPVReductionSC; in classof()
1366 VPValue *getChainOp() const { return getOperand(0); } in getChainOp()
1368 VPValue *getVecOp() const { return getOperand(1); } in getVecOp()
1370 VPValue *getCondOp() const { in getCondOp()
1379 class VPReplicateRecipe : public VPRecipeBase, public VPValue {
1393 : VPRecipeBase(VPReplicateSC, Operands), VPValue(VPVReplicateSC, I, this), in VPRecipeBase()
1410 static inline bool classof(const VPValue *V) { in classof()
1411 return V->getVPValueID() == VPValue::VPVReplicateSC; in classof()
1437 VPBranchOnMaskRecipe(VPValue *BlockInMask) in VPBranchOnMaskRecipe()
1457 if (VPValue *Mask = getMask()) in print()
1466 VPValue *getMask() const { in getMask()
1478 class VPPredInstPHIRecipe : public VPRecipeBase, public VPValue {
1482 VPPredInstPHIRecipe(VPValue *PredV) in VPPredInstPHIRecipe()
1484 VPValue(VPValue::VPVPredInstPHI, nullptr, this) {} in VPPredInstPHIRecipe()
1511 void setMask(VPValue *Mask) { in setMask()
1522 VPWidenMemoryInstructionRecipe(LoadInst &Load, VPValue *Addr, VPValue *Mask) in VPWidenMemoryInstructionRecipe()
1524 new VPValue(VPValue::VPVMemoryInstructionSC, &Load, this);
1528 VPWidenMemoryInstructionRecipe(StoreInst &Store, VPValue *Addr, in VPWidenMemoryInstructionRecipe()
1529 VPValue *StoredValue, VPValue *Mask) in VPWidenMemoryInstructionRecipe()
1541 VPValue *getAddr() const { in getAddr()
1547 VPValue *getMask() const { in getMask()
1556 VPValue *getStoredValue() const { in getStoredValue()
1575 new VPValue(nullptr, this);
1682 void dropAllReferences(VPValue *NewValue) override;
1741 VPValue DummyValue; in ~VPRegionBlock()
1790 void dropAllReferences(VPValue *NewValue) override;
2080 SetVector<VPValue *> VPExternalDefs;
2084 VPValue *BackedgeTakenCount = nullptr;
2092 SmallVector<VPValue *, 16> VPValuesToFree;
2105 VPValue DummyValue;
2111 for (VPValue *VPV : VPValuesToFree)
2115 for (VPValue *Def : VPExternalDefs)
2132 VPValue *getOrCreateBackedgeTakenCount() {
2134 BackedgeTakenCount = new VPValue();
2148 void addExternalDef(VPValue *VPVal) { VPExternalDefs.insert(VPVal); }
2153 VPValue *VPV = new VPValue(V);
2158 void addVPValue(Value *V, VPValue *VPV) {
2164 VPValue *getVPValue(Value *V) {
2170 VPValue *getOrAddVPValue(Value *V) {
2196 iterator_range<mapped_iterator<Use *, std::function<VPValue *(Value *)>>>
2198 std::function<VPValue *(Value *)> Fn = [this](Value *Op) {
2313 VPValue *Condition, VPBlockBase *BlockPtr) {
2449 static SmallVector<VPValue *, 4> getEmptyKey() {
2450 return {reinterpret_cast<VPValue *>(-1)};
2453 static SmallVector<VPValue *, 4> getTombstoneKey() {
2454 return {reinterpret_cast<VPValue *>(-2)};
2457 static unsigned getHashValue(const SmallVector<VPValue *, 4> &V) {
2461 static bool isEqual(const SmallVector<VPValue *, 4> &LHS,
2462 const SmallVector<VPValue *, 4> &RHS) {
2468 DenseMap<SmallVector<VPValue *, 4>, VPInstruction *, BundleDenseMapInfo>
2484 typename std::pair<VPInstruction *, SmallVector<VPValue *, 4>>;
2496 bool areVectorizable(ArrayRef<VPValue *> Operands) const;
2499 void addCombined(ArrayRef<VPValue *> Operands, VPInstruction *New);
2511 std::pair<OpMode, VPValue *> getBest(OpMode Mode, VPValue *Last,
2512 SmallPtrSetImpl<VPValue *> &Candidates,
2517 void dumpBundle(ArrayRef<VPValue *> Values);
2527 VPInstruction *buildGraph(ArrayRef<VPValue *> Operands);