lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
static NDVectorTypeInfo extractNDVectorTypeInfo(VectorType vectorType,
                                                LLVMTypeConverter &converter) {
  assert(vectorType.getRank() > 1 && "expected >1D vector type");
  NDVectorTypeInfo info;
  info.llvmArrayTy =
      converter.convertType(vectorType).dyn_cast<LLVM::LLVMType>();
  if (!info.llvmArrayTy)
    return info;
  info.arraySizes.reserve(vectorType.getRank() - 1);
  auto llvmTy = info.llvmArrayTy;
  while (llvmTy.isArrayTy()) {
    info.arraySizes.push_back(llvmTy.getArrayNumElements());
    llvmTy = llvmTy.getArrayElementType();
  }
  if (!llvmTy.isVectorTy())
    return info;
  info.llvmVectorTy = llvmTy;
  return info;
}
// For >1-D vector types, extracts the necessary information to iterate over all
// 1-D subvectors in the underlying llrepresentation of the n-D vector
// Iterates on the llvm array type until we hit a non-array type (which is
// asserted to be an llvm vector type).
For >1-D vector types, extracts the necessary information to iterate over all
1-D subvectors in the underlying llrepresentation of the n-D vector
Iterates on the llvm array type until we hit a non-array type (which is
asserted to be an llvm vector type).
For > 1 - D vector types extracts the necessary information to iterate over all 1 - D subvectors in the underlying llrepresentation of the n - D vector Iterates on the llvm array type until we hit a non - array type ( which is asserted to be an llvm vector type ) .
static NDVectorTypeInfo extractNDVectorTypeInfo(VectorType vectorType,
                                                LLVMTypeConverter &converter) {
  assert(vectorType.getRank() > 1 && "expected >1D vector type");
  NDVectorTypeInfo info;
  info.llvmArrayTy =
      converter.convertType(vectorType).dyn_cast<LLVM::LLVMType>();
  if (!info.llvmArrayTy)
    return info;
  info.arraySizes.reserve(vectorType.getRank() - 1);
  auto llvmTy = info.llvmArrayTy;
  while (llvmTy.isArrayTy()) {
    info.arraySizes.push_back(llvmTy.getArrayNumElements());
    llvmTy = llvmTy.getArrayElementType();
  }
  if (!llvmTy.isVectorTy())
    return info;
  info.llvmVectorTy = llvmTy;
  return info;
}
static NDVectorTypeInfo extractNDVectorTypeInfo ( VectorType vectorType , LLVMTypeConverter & converter ) { assert ( vectorType . getRank ( ) > 1 && " " ) ; NDVectorTypeInfo info ; info . llvmArrayTy = converter . convertType ( vectorType ) . dyn_cast < LLVM :: LLVMType > ( ) ; if ( ! info . llvmArrayTy ) return info ; info . arraySizes . reserve ( vectorType . getRank ( ) - 1 ) ; auto llvmTy = info . llvmArrayTy ; while ( llvmTy . isArrayTy ( ) ) { info . arraySizes . push_back ( llvmTy . getArrayNumElements ( ) ) ; llvmTy = llvmTy . getArrayElementType ( ) ; } if ( ! llvmTy . isVectorTy ( ) ) return info ; info . llvmVectorTy = llvmTy ; return info ; }
For >1-D vector types, extracts the necessary information to iterate over all
1-D subvectors in the underlying llrepresentation of the n-D vector
Iterates on the llvm array type until we hit a non-array type (which is
asserted to be an llvm vector type).
For > 1 - D vector types extracts the necessary information to iterate over all 1 - D subvectors in the underlying llrepresentation of the n - D vector Iterates on the llvm array type until we hit a non - array type ( which is asserted to be an llvm vector type ) .