Anastasia added inline comments.

================
Comment at: lib/CodeGen/CGBlocks.cpp:311
+    // The header is basically 'struct { int; int; generic void *;
+    // custom_fields; }'. Assert that that struct is packed.
+    auto GenPtrAlign = CharUnits::fromQuantity(
----------------
remove one "that".


================
Comment at: lib/CodeGen/CGBlocks.cpp:312
+    // custom_fields; }'. Assert that that struct is packed.
+    auto GenPtrAlign = CharUnits::fromQuantity(
+        CGM.getTarget().getPointerAlign(LangAS::opencl_generic) / 8);
----------------
I think the alignment might not be computed correctly now if there will be 
custom fields that might have a bigger size than a pointer? Also what happens 
if we have captures as well?


================
Comment at: lib/CodeGen/CGBlocks.cpp:850
+                           CGM.getDataLayout().getTypeAllocSize(I->getType())),
+                       "block.custom");
+      }
----------------
do we need to add numeration to each item name?


================
Comment at: lib/CodeGen/CGBlocks.cpp:1250
   // Function
   fields.add(blockFn);
 
----------------
If we reorder fields and put this on top we can merge the if statements above 
and below this point.


https://reviews.llvm.org/D37822



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

Reply via email to