================
@@ -1315,7 +1315,53 @@ AggValueSlot::Overlap_t
CIRGenFunction::getOverlapForBaseInit(
return AggValueSlot::MayOverlap;
}
+/// CheckAggExprForMemSetUse - If the initializer is large and has a lot of
+/// zeros in it, emit a memset and avoid storing the individual zeros.
+static void checkAggExprForMemSetUse(AggValueSlot &slot, const Expr *e,
+ CIRGenFunction &cgf) {
+ // If the slot is already known to be zeroed, nothing to do. Don't mess with
+ // volatile stores.
+ if (slot.isZeroed() || slot.isVolatile() || !slot.getAddress().isValid())
+ return;
+
+ // C++ objects with a user-declared constructor don't need zero'ing.
+ if (cgf.getLangOpts().CPlusPlus)
----------------
andykaylor wrote:
This should have curly braces since the enclosed if uses them.
https://github.com/llvm/llvm-project/pull/244282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits