Lines Matching defs:MemInst
962 Value *getMatchingValue(LoadValue &InVal, ParseMemoryInst &MemInst,
1243 Value *EarlyCSE::getMatchingValue(LoadValue &InVal, ParseMemoryInst &MemInst,
1247 if (InVal.MatchingId != MemInst.getMatchingId())
1250 if (MemInst.isVolatile() || !MemInst.isUnordered())
1253 if (MemInst.isLoad() && !InVal.IsAtomic && MemInst.isAtomic())
1256 // on whether MemInst is a load or a store. If it's a load, we will replace
1257 // MemInst with V, if it's a store, we will check if V is the same as the
1259 bool MemInstMatching = !MemInst.isLoad();
1260 Instruction *Matching = MemInstMatching ? MemInst.get() : InVal.DefInst;
1261 Instruction *Other = MemInstMatching ? InVal.DefInst : MemInst.get();
1265 Value *Result = MemInst.isStore()
1268 if (MemInst.isStore() && InVal.DefInst != Result)
1278 cast<IntrinsicInst>(MemInst.get())))
1282 if (!isOperatingOnInvariantMemAt(MemInst.get(), InVal.Generation) &&
1284 MemInst.get()))
1563 ParseMemoryInst MemInst(&Inst, TTI);
1565 if (MemInst.isValid() && MemInst.isLoad()) {
1568 if (MemInst.isVolatile() || !MemInst.isUnordered()) {
1573 if (MemInst.isInvariantLoad()) {
1591 LoadValue InVal = AvailableLoads.lookup(MemInst.getPointerOperand());
1592 if (Value *Op = getMatchingValue(InVal, MemInst, CurrentGeneration)) {
1613 AvailableLoads.insert(MemInst.getPointerOperand(),
1615 MemInst.getMatchingId(),
1616 MemInst.isAtomic(),
1617 MemInst.isLoad()));
1629 !(MemInst.isValid() && !MemInst.mayReadFromMemory()))
1703 if (MemInst.isValid() && MemInst.isStore()) {
1704 LoadValue InVal = AvailableLoads.lookup(MemInst.getPointerOperand());
1706 InVal.DefInst == getMatchingValue(InVal, MemInst, CurrentGeneration)) {
1713 MemInst.getPointerOperand() ||
1738 if (MemInst.isValid() && MemInst.isStore()) {
1742 if (overridingStores(ParseMemoryInst(LastStore, TTI), MemInst)) {
1764 AvailableLoads.insert(MemInst.getPointerOperand(),
1766 MemInst.getMatchingId(),
1767 MemInst.isAtomic(),
1768 MemInst.isLoad()));
1777 if (MemInst.isUnordered() && !MemInst.isVolatile())