Lines Matching defs:MI

177     void RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
1611 } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) {
1612 ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength());
1619 UI.getOperandNo() == 0, Info, MI,
1883 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) {
1884 ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength());
1888 RewriteMemIntrinUserOfAlloca(MI, I, AI, NewElts);
2154 /// RewriteMemIntrinUserOfAlloca - MI is a memcpy/memset/memmove from or to AI.
2157 SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
2165 unsigned MemAlignment = MI->getAlignment();
2166 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI)) { // memmove/memcopy
2192 // Put only one reference to MI on the DeadInsts list.
2195 if (*I == MI) return;
2196 DeadInsts.push_back(MI);
2206 OtherPtr = new BitCastInst(OtherPtr, NewTy, OtherPtr->getName(), MI);
2210 bool SROADest = MI->getRawDest() == Inst;
2212 Constant *Zero = Constant::getNullValue(Type::getInt32Ty(MI->getContext()));
2221 ConstantInt::get(Type::getInt32Ty(MI->getContext()), i) };
2224 MI);
2248 if (isa<MemTransferInst>(MI)) {
2251 Value *Elt = new LoadInst(OtherElt, "tmp", false, OtherEltAlign, MI);
2252 new StoreInst(Elt, EltPtr, MI);
2255 Value *Elt = new LoadInst(EltPtr, "tmp", MI);
2256 new StoreInst(Elt, OtherElt, false, OtherEltAlign, MI);
2260 assert(isa<MemSetInst>(MI));
2265 if (ConstantInt *CI = dyn_cast<ConstantInt>(MI->getArgOperand(1))) {
2296 new StoreInst(StoreVal, EltPtr, MI);
2307 IRBuilder<> Builder(MI);
2310 if (isa<MemSetInst>(MI)) {
2311 Builder.CreateMemSet(EltPtr, MI->getArgOperand(1), EltSize,
2312 MI->isVolatile());
2314 assert(isa<MemTransferInst>(MI));
2318 if (isa<MemCpyInst>(MI))
2319 Builder.CreateMemCpy(Dst, Src, EltSize, OtherEltAlign,MI->isVolatile());
2321 Builder.CreateMemMove(Dst, Src, EltSize,OtherEltAlign,MI->isVolatile());
2324 DeadInsts.push_back(MI);