diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-08-07 12:18:38 -0700 |
---|---|---|
committer | Andrew Pinski <andrew.pinski@oss.qualcomm.com> | 2025-08-10 09:36:48 -0700 |
commit | 14ad799ae1545569be158b00865f6f2f951657bd (patch) | |
tree | 36be80c5b989543d6c436ba270bc001acb7f9c96 /gcc/fortran/trans-array.h | |
parent | 405f45aae779fe7694e8660cfa828f1cef58b101 (diff) | |
download | gcc-14ad799ae1545569be158b00865f6f2f951657bd.zip gcc-14ad799ae1545569be158b00865f6f2f951657bd.tar.gz gcc-14ad799ae1545569be158b00865f6f2f951657bd.tar.bz2 |
varasm: Redo mergeable section support [PR121438]
We increased the switch conversion array decl alignment
for better mergeability but it turns out that we increase
the alignment on targets which don't support mergeable sections
(e.g. NVPTX). Also after the fix for PR 121394, it becomes
obvious that we can place any sized into the mergeable section
instead of increasing the alignment.
This implements that and now also fixes PR 121438 as we don't
need to increase the alignment for the mergeable decls that
were being created by the C++ front-end.
Bootstrapped and tested on x86_64-linux-gnu.
PR middle-end/121438
PR middle-end/121444
gcc/ChangeLog:
* output.h (MAX_ALIGN_MERGABLE): Rename to ...
(MAX_MERGEABLE_BITSIZE): This.
* tree-switch-conversion.cc (switch_conversion::build_one_array): Don't
increase the alignment.
* varasm.cc (mergeable_string_section): Use MAX_MERGEABLE_BITSIZE
instead of MAX_ALIGN_MERGABLE. Also replace `/ 8` with `/ BITS_PER_UNIT`.
(mergeable_constant_section): Select the mergeable section based on
the bitsize rather than the alignment. Make sure the align is less
than the entity size.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/fortran/trans-array.h')
0 files changed, 0 insertions, 0 deletions