[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-02-15 Thread via cfe-commits
serge-sans-paille wrote: > It's not clear to me this is actually consistently profitable if the computed > offset is small. If we have to emit a memset starting at a weird offset, the > code might get worse overall. (e.g. on x86, a memset of 32 bytes is three > instructions; a memset of 31

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-02-15 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From ead2aca22a0f964d0f316e5ea7a5e3967844c015 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-02-01 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 1010379cd5e871fc404e58dbce348e953ebaf75c Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-02-01 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 707050175b73e61e3be8da7c2b4683be8afa6db7 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/79502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread Eli Friedman via cfe-commits
@@ -945,48 +950,77 @@ static bool canEmitInitWithFewStoresAfterBZero(llvm::Constant *Init, /// For inits that canEmitInitWithFewStoresAfterBZero returned true for, emit /// the scalar stores that would be required. -static void emitStoresForInitAfterBZero(CodeGenModule , -

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread Eli Friedman via cfe-commits
@@ -945,48 +950,77 @@ static bool canEmitInitWithFewStoresAfterBZero(llvm::Constant *Init, /// For inits that canEmitInitWithFewStoresAfterBZero returned true for, emit /// the scalar stores that would be required. -static void emitStoresForInitAfterBZero(CodeGenModule , -

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: It's not clear to me this is actually consistently profitable if the computed offset is small. If we have to emit a memset starting at a weird offset, the code might get worse overall. (e.g. on x86, a memset of 32 bytes is three instructions; a

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 2e1955b49402cae24835fd5346f073f039acc975 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 5ecd085ebf94d8382290cf30ceec704102b7a0af Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-31 Thread via cfe-commits
@@ -1209,8 +1301,21 @@ static void emitStoresForConstant(CodeGenModule , const VarDecl , // If the initializer is all or mostly the same, codegen with bzero / memset // then do a few stores afterward. if (shouldUseBZeroPlusStoresToInitialize(constant, ConstantSize)) { -

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-30 Thread Eli Friedman via cfe-commits
@@ -1209,8 +1301,21 @@ static void emitStoresForConstant(CodeGenModule , const VarDecl , // If the initializer is all or mostly the same, codegen with bzero / memset // then do a few stores afterward. if (shouldUseBZeroPlusStoresToInitialize(constant, ConstantSize)) { -

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-29 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 376f62b2aa3e1c2ec37b53a66f7525ae02e54172 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-29 Thread via cfe-commits
serge-sans-paille wrote: @nikic / @AaronBallman any thought on the general approach? https://github.com/llvm/llvm-project/pull/79502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-26 Thread via cfe-commits
serge-sans-paille wrote: > (Extra tests needed) test added, ready for review https://github.com/llvm/llvm-project/pull/79502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-26 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From 1ca9d2d7697528b1a126cc95a2fb7a9e5bb8669a Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff e99edf6bcb20169e153110426f840a2dfeeec66d e2231f4de6e835618cf30b0bab6b3cc72839dc94 --

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-25 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From e2231f4de6e835618cf30b0bab6b3cc72839dc94 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-25 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/79502 >From e9151018b7a086b167db394caadb74e20dc27711 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set the trailing bytes to zero when

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-25 Thread via cfe-commits
serge-sans-paille wrote: (Extra tests needed) https://github.com/llvm/llvm-project/pull/79502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (serge-sans-paille) Changes …initialized array Fix #79500 --- Full diff: https://github.com/llvm/llvm-project/pull/79502.diff 3 Files Affected: - (modified) clang/lib/CodeGen/CGDecl.cpp (+58-2) - (modified)

[clang] [clang] Only set the trailing bytes to zero when filling a partially … (PR #79502)

2024-01-25 Thread via cfe-commits
https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/79502 …initialized array Fix #79500 >From 9aa54f3f4ecfcf2dad80ec3a57a3d41027356e55 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Jan 2024 22:12:55 +0100 Subject: [PATCH] [clang] Only set