Lines Matching defs:AvailableValue
195 /// Materialization of an AvailableValue never fails. An AvailableValue is
198 struct llvm::gvn::AvailableValue {
219 static AvailableValue get(Value *V, unsigned Offset = 0) {
220 AvailableValue Res;
227 static AvailableValue getMI(MemIntrinsic *MI, unsigned Offset = 0) {
228 AvailableValue Res;
235 static AvailableValue getLoad(LoadInst *Load, unsigned Offset = 0) {
236 AvailableValue Res;
243 static AvailableValue getUndef() {
244 AvailableValue Res;
251 static AvailableValue getSelect(SelectInst *Sel, Value *V1, Value *V2) {
252 AvailableValue Res;
293 /// Represents an AvailableValue which can be rematerialized at the end of
300 AvailableValue AV;
302 static AvailableValueInBlock get(BasicBlock *BB, AvailableValue &&AV) {
311 return get(BB, AvailableValue::get(V, Offset));
315 return get(BB, AvailableValue::getUndef());
320 return get(BB, AvailableValue::getSelect(Sel, V1, V2));
1090 Value *AvailableValue::MaterializeAdjustedValue(LoadInst *Load,
1256 std::optional<AvailableValue>
1275 return AvailableValue::get(DepSI->getValueOperand(), Offset);
1305 return AvailableValue::getLoad(DepLoad, Offset);
1316 return AvailableValue::getMI(DepMI, Offset);
1335 return AvailableValue::get(UndefValue::get(Load->getType()));
1339 return AvailableValue::get(InitVal);
1353 return AvailableValue::get(S->getValueOperand());
1367 return AvailableValue::getLoad(LD);
1386 return AvailableValue::getSelect(Sel, V1, V2);
1912 static void reportLoadElim(LoadInst *Load, Value *AvailableValue,
1920 << NV("InfavorOfValue", AvailableValue);
2204 Value *AvailableValue = AV->MaterializeAdjustedValue(L, L, *this);
2208 L->replaceAllUsesWith(AvailableValue);
2213 reportLoadElim(L, AvailableValue, ORE);
2216 if (MD && AvailableValue->getType()->isPtrOrPtrVectorTy())
2217 MD->invalidateCachedPointerInfo(AvailableValue);