jdoerfert added inline comments.

================
Comment at: clang/lib/CodeGen/CGExpr.cpp:103
+    if (!ArraySize) {
+      auto *EBB = AllocaInsertPt->getParent();
+      auto Iter = AllocaInsertPt->getIterator();
----------------
arsenm wrote:
> Why is there a special AllocaInsertPt iterator in the first place? Can you 
> avoid any iteration logic by just always inserting at the block start?
Right. The alloca insertion point is sometimes changed to a non-entry block, 
and we should keep that ability.
From all the use cases I know it would suffice to insert at the beginning of 
the alloca insertion point block though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110257

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to