Lines Matching defs:AI
85 AllocaInst &AI) {
89 Builder.SetInsertPoint(&AI);
92 Type *AllocElTy = AI.getAllocatedType();
103 if (!AI.hasOneUse() && CastElTyAlign == AllocElTyAlign) return nullptr;
113 if (!AI.hasOneUse() && CastElTyStoreSize < AllocElTyStoreSize) return nullptr;
120 decomposeSimpleLinearExpr(AI.getOperand(0), ArraySizeScale, ArrayOffset);
132 Amt = ConstantInt::get(AI.getArraySize()->getType(), Scale);
138 Value *Off = ConstantInt::get(AI.getArraySize()->getType(),
144 New->setAlignment(AI.getAlign());
145 New->takeName(&AI);
146 New->setUsedWithInAlloca(AI.isUsedWithInAlloca());
151 if (!AI.hasOneUse()) {
152 // New is the allocation instruction, pointer typed. AI is the original
154 Value *NewCast = Builder.CreateBitCast(New, AI.getType(), "tmpcast");
155 replaceInstUsesWith(AI, NewCast);
156 eraseInstFromFunction(AI);
2515 if (AllocaInst *AI = dyn_cast<AllocaInst>(Src))
2516 if (Instruction *V = PromoteCastOfAllocation(CI, *AI))