Lines Matching defs:Value

99     friend hash_code hash_value(const Expression &Value) {
100 return hash_combine(Value.opcode, Value.type,
101 hash_combine_range(Value.varargs.begin(),
102 Value.varargs.end()));
107 DenseMap<Value*, uint32_t> valueNumbering;
118 Value *LHS, Value *RHS);
123 uint32_t lookup_or_add(Value *V);
124 uint32_t lookup(Value *V) const;
126 Value *LHS, Value *RHS);
127 void add(Value *V, uint32_t num);
129 void erase(Value *v);
135 void verifyRemoved(const Value *) const;
200 Value *LHS, Value *RHS) {
274 void ValueTable::add(Value *V, uint32_t num) {
389 uint32_t ValueTable::lookup_or_add(Value *V) {
390 DenseMap<Value*, uint32_t>::iterator VI = valueNumbering.find(V);
460 uint32_t ValueTable::lookup(Value *V) const {
461 DenseMap<Value*, uint32_t>::const_iterator VI = valueNumbering.find(V);
462 assert(VI != valueNumbering.end() && "Value not numbered?");
472 Value *LHS, Value *RHS) {
487 void ValueTable::erase(Value *V) {
493 void ValueTable::verifyRemoved(const Value *V) const {
494 for (DenseMap<Value*, uint32_t>::const_iterator
518 PointerIntPair<Value *, 2, ValType> Val;
523 static AvailableValueInBlock get(BasicBlock *BB, Value *V,
567 Value *getSimpleValue() const {
584 Value *MaterializeAdjustedValue(Type *LoadTy, GVN &gvn) const;
597 /// LeaderTable - A mapping from value numbers to lists of Value*'s that
600 Value *Val;
634 /// addToLeaderTable - Push a new Value to the LeaderTable onto the list for
636 void addToLeaderTable(uint32_t N, Value *V, const BasicBlock *BB) {
705 void dump(DenseMap<uint32_t, Value*> &d);
708 Value *findLeader(const BasicBlock *BB, uint32_t num);
713 unsigned replaceAllDominatedUsesWith(Value *From, Value *To,
715 bool propagateEquality(Value *LHS, Value *RHS, const BasicBlockEdge &Root);
729 INITIALIZE_PASS_BEGIN(GVN, "gvn", "Global Value Numbering", false, false)
734 INITIALIZE_PASS_END(GVN, "gvn", "Global Value Numbering", false, false)
737 void GVN::dump(DenseMap<uint32_t, Value*>& d) {
739 for (DenseMap<uint32_t, Value*>::iterator I = d.begin(),
831 static bool CanCoerceMustAliasedValueToLoad(Value *StoredVal,
855 static Value *CoerceAvailableValueToLoadType(Value *StoredVal,
942 static int AnalyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr,
943 Value *WritePtr,
952 Value *StoreBase = GetPointerBaseWithConstantOffset(WritePtr,StoreOffset,&DL);
953 Value *LoadBase = GetPointerBaseWithConstantOffset(LoadPtr, LoadOffset, &DL);
1016 static int AnalyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr,
1024 Value *StorePtr = DepSI->getPointerOperand();
1033 static int AnalyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr,
1039 Value *DepPtr = DepLI->getPointerOperand();
1047 const Value *LoadBase =
1060 static int AnalyzeLoadFromClobberingMemInst(Type *LoadTy, Value *LoadPtr,
1111 static Value *GetStoreValueForLoad(Value *SrcVal, unsigned Offset,
1150 static Value *GetLoadValueForLoad(LoadInst *SrcVal, unsigned Offset,
1167 Value *PtrVal = SrcVal->getPointerOperand();
1188 Value *RV = NewLoad;
1210 static Value *GetMemInstValueForLoad(MemIntrinsic *SrcInst, unsigned Offset,
1223 Value *Val = MSI->getValue();
1227 Value *OneElt = Val;
1233 Value *ShVal = Builder.CreateShl(Val, NumBytesSet*8);
1240 Value *ShVal = Builder.CreateShl(Val, 1*8);
1268 static Value *ConstructSSAForLoadSet(LoadInst *LI,
1298 Value *V = SSAUpdate.GetValueInMiddleOfBlock(LI->getParent());
1322 Value *AvailableValueInBlock::MaterializeAdjustedValue(Type *LoadTy, GVN &gvn) const {
1323 Value *Res;
1399 Value *Address = Deps[i].getAddress();
1550 MapVector<BasicBlock *, Value *> PredLoads;
1620 Value *LoadPtr = nullptr;
1666 Value *LoadPtr = PredLoad.second;
1687 Value *V = ConstructSSAForLoadSet(LI, ValuesPerBlock, *this);
1744 Value *V = ConstructSSAForLoadSet(LI, ValuesPerBlock, *this);
1764 static void patchReplacementInstruction(Instruction *I, Value *Repl) {
1810 static void patchAndReplaceAllUsesWith(Instruction *I, Value *Repl) {
1845 Value *AvailVal = nullptr;
1924 Value *StoredVal = DepSI->getValueOperand();
1953 Value *AvailableVal = DepLI;
2019 Value *GVN::findLeader(const BasicBlock *BB, uint32_t num) {
2023 Value *Val = nullptr;
2045 unsigned GVN::replaceAllDominatedUsesWith(Value *From, Value *To,
2048 for (Value::use_iterator UI = From->use_begin(), UE = From->use_end();
2080 bool GVN::propagateEquality(Value *LHS, Value *RHS,
2082 SmallVector<std::pair<Value*, Value*>, 4> Worklist;
2090 std::pair<Value*, Value*> Item = Worklist.pop_back_val();
2158 Value *A, *B;
2170 Value *Op0 = Cmp->getOperand(0), *Op1 = Cmp->getOperand(1);
2189 Value *NotCmp = findLeader(Root.getEnd(), Num);
2219 // to value numbering it. Value numbering often exposes redundancies, for
2222 if (Value *V = SimplifyInstruction(I, DL, TLI, DT)) {
2249 Value *BranchCond = BI->getCondition();
2259 Value *TrueVal = ConstantInt::getTrue(TrueSucc->getContext());
2263 Value *FalseVal = ConstantInt::getFalse(FalseSucc->getContext());
2272 Value *SwitchCond = SI->getCondition();
2317 Value *repl = findLeader(I->getParent(), Num);
2442 SmallVector<std::pair<Value*, BasicBlock*>, 8> predMap;
2500 Value* predV = findLeader(P, ValNo);
2502 predMap.push_back(std::make_pair(static_cast<Value *>(nullptr), P));
2541 Value *Op = PREInstr->getOperand(i);
2545 if (Value *V = findLeader(PREPred, VN.lookup(Op))) {
2576 if (Value *V = predMap[i].first)