[PATCH] D83553: [PATCH 3/4][Sema][AArch64] Add codegen for arm_sve_vector_bits attribute

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 21:16:28 PDT 2020


efriedma added inline comments.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:152
+      Align, Name,
+      /*ArraySize=*/nullptr, Alloca);
 
----------------
Do we need to bitcast the result of CreateTempAlloca to a pointer to the array type?  I'm concerned that we might miss a bitcast if the source code uses the address of the variable.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3985
+    else
+      Init = EmitNullConstant(D->getType());
   } else {
----------------
EmitNullConstant should just do the right thing, I think, now that we've changed the default behavior of ConvertTypeForMem.


================
Comment at: clang/lib/CodeGen/CodeGenTypes.cpp:151
+      return llvm::ArrayType::get(*MemTy, A->getSize().getZExtValue());
+  }
+
----------------
I think the default handling for constant arrays should do the right thing, now that we've changed the default behavior of ConvertTypeForMem.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83553/new/

https://reviews.llvm.org/D83553





More information about the cfe-commits mailing list