reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  184   if (!AI.isArrayAllocation()) {
  186     if (AI.getArraySize()->getType()->isIntegerTy(32))
  191     AI.setOperand(0, V);
  192     return &AI;
  196   if (const ConstantInt *C = dyn_cast<ConstantInt>(AI.getArraySize())) {
  198       Type *NewTy = ArrayType::get(AI.getAllocatedType(), C->getZExtValue());
  199       AllocaInst *New = IC.Builder.CreateAlloca(NewTy, nullptr, AI.getName());
  200       New->setAlignment(MaybeAlign(AI.getAlignment()));
  212       Type *IdxTy = IC.getDataLayout().getIntPtrType(AI.getType());
  221       return IC.replaceInstUsesWith(AI, GEP);
  225   if (isa<UndefValue>(AI.getArraySize()))
  226     return IC.replaceInstUsesWith(AI, Constant::getNullValue(AI.getType()));
  226     return IC.replaceInstUsesWith(AI, Constant::getNullValue(AI.getType()));
  230   Type *IntPtrTy = IC.getDataLayout().getIntPtrType(AI.getType());
  231   if (AI.getArraySize()->getType() != IntPtrTy) {
  232     Value *V = IC.Builder.CreateIntCast(AI.getArraySize(), IntPtrTy, false);
  233     AI.setOperand(0, V);
  234     return &AI;