Lines Matching refs:Value
87 DenseMap<Value *, Constant *> SimplifiedValues;
91 DenseMap<Value *, Value *> SROAArgValues;
96 DenseMap<Value *, int> SROAArgCosts;
99 DenseMap<Value *, std::pair<Value *, APInt> > ConstantOffsetPtrs;
102 bool isAllocaDerivedArg(Value *V);
103 bool lookupSROAArgAndCost(Value *V, Value *&Arg,
104 DenseMap<Value *, int>::iterator &CostIt);
105 void disableSROA(DenseMap<Value *, int>::iterator CostIt);
106 void disableSROA(Value *V);
107 void accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
112 ConstantInt *stripAndComputeInBoundsConstantOffsets(Value *&V);
121 /// Return true if the given value is known non null within the callee if
123 bool isKnownNonNullInCallee(Value *V);
126 bool analyzeBlock(BasicBlock *BB, SmallPtrSetImpl<const Value *> &EphValues);
198 /// \brief Test whether the given value is an Alloca-derived function argument.
199 bool CallAnalyzer::isAllocaDerivedArg(Value *V) {
206 Value *V, Value *&Arg, DenseMap<Value *, int>::iterator &CostIt) {
210 DenseMap<Value *, Value *>::iterator ArgIt = SROAArgValues.find(V);
223 void CallAnalyzer::disableSROA(DenseMap<Value *, int>::iterator CostIt) {
233 void CallAnalyzer::disableSROA(Value *V) {
234 Value *SROAArg;
235 DenseMap<Value *, int>::iterator CostIt;
241 void CallAnalyzer::accumulateSROACost(DenseMap<Value *, int>::iterator CostIt,
325 // especially when they collapse to a single value due to deleted CFG edges
337 Value *SROAArg;
338 DenseMap<Value *, int>::iterator CostIt;
346 Value *Ptr = I.getPointerOperand();
347 std::pair<Value *, APInt> BaseAndOffset = ConstantOffsetPtrs.lookup(Ptr);
396 std::pair<Value *, APInt> BaseAndOffset
403 Value *SROAArg;
404 DenseMap<Value *, int>::iterator CostIt;
428 std::pair<Value *, APInt> BaseAndOffset
441 Value *SROAArg;
442 DenseMap<Value *, int>::iterator CostIt;
462 Value *Op = I.getOperand(0);
466 std::pair<Value *, APInt> BaseAndOffset = ConstantOffsetPtrs.lookup(Op);
472 Value *SROAArg;
473 DenseMap<Value *, int>::iterator CostIt;
498 Value *Operand = I.getOperand(0);
522 bool CallAnalyzer::isKnownNonNullInCallee(Value *V) {
537 // alloca-derived value and null. Note that this fires regardless of
545 Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
566 Value *LHSBase, *RHSBase;
585 // if we know the value (argument) can't be null
594 Value *SROAArg;
595 DenseMap<Value *, int>::iterator CostIt;
611 Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
612 Value *LHSBase, *RHSBase;
636 Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
644 Value *SimpleV = nullptr;
664 Value *SROAArg;
665 DenseMap<Value *, int>::iterator CostIt;
679 Value *SROAArg;
680 DenseMap<Value *, int>::iterator CostIt;
694 // Constant folding for extract value is trivial.
708 // Constant folding for insert value is trivial.
817 Value *Callee = CS.getCalledValue();
866 if (Value *V = SimplifiedValues.lookup(SI.getCondition()))
950 SmallPtrSetImpl<const Value *> &EphValues) {
1027 ConstantInt *CallAnalyzer::stripAndComputeInBoundsConstantOffsets(Value *&V) {
1037 SmallPtrSet<Value *, 4> Visited;
1177 Value *PtrArg = *CAI;
1195 SmallPtrSet<const Value *, 32> EphValues;
1252 Value *Cond = BI->getCondition();
1260 Value *Cond = SI->getCondition();