Lines Matching defs:AvailableValue
188 /// Materialization of an AvailableValue never fails. An AvailableValue is
191 struct llvm::gvn::AvailableValue {
212 static AvailableValue get(Value *V, unsigned Offset = 0) {
213 AvailableValue Res;
220 static AvailableValue getMI(MemIntrinsic *MI, unsigned Offset = 0) {
221 AvailableValue Res;
228 static AvailableValue getLoad(LoadInst *Load, unsigned Offset = 0) {
229 AvailableValue Res;
236 static AvailableValue getUndef() {
237 AvailableValue Res;
244 static AvailableValue getSelect(SelectInst *Sel, Value *V1, Value *V2) {
245 AvailableValue Res;
286 /// Represents an AvailableValue which can be rematerialized at the end of
293 AvailableValue AV;
295 static AvailableValueInBlock get(BasicBlock *BB, AvailableValue &&AV) {
304 return get(BB, AvailableValue::get(V, Offset));
308 return get(BB, AvailableValue::getUndef());
313 return get(BB, AvailableValue::getSelect(Sel, V1, V2));
1070 Value *AvailableValue::MaterializeAdjustedValue(LoadInst *Load,
1233 std::optional<AvailableValue>
1252 return AvailableValue::get(DepSI->getValueOperand(), Offset);
1282 return AvailableValue::getLoad(DepLoad, Offset);
1293 return AvailableValue::getMI(DepMI, Offset);
1312 return AvailableValue::get(UndefValue::get(Load->getType()));
1316 return AvailableValue::get(InitVal);
1330 return AvailableValue::get(S->getValueOperand());
1344 return AvailableValue::getLoad(LD);
1363 return AvailableValue::getSelect(Sel, V1, V2);
1888 static void reportLoadElim(LoadInst *Load, Value *AvailableValue,
1896 << NV("InfavorOfValue", AvailableValue);
2233 Value *AvailableValue = AV->MaterializeAdjustedValue(L, L, *this);
2237 L->replaceAllUsesWith(AvailableValue);
2242 reportLoadElim(L, AvailableValue, ORE);
2245 if (MD && AvailableValue->getType()->isPtrOrPtrVectorTy())
2246 MD->invalidateCachedPointerInfo(AvailableValue);