diff options
author | David Faust <david.faust@oracle.com> | 2022-04-07 09:41:37 -0700 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2022-04-07 09:57:46 -0700 |
commit | 5559bdc86635b2ff6cbaa60e933a7989ff212e1f (patch) | |
tree | 96e6621e8cb28606efa91c030d2b9de4c77339f6 /gcc/rust/backend/rust-mangle.cc | |
parent | b829e7c0a21c94672d09732e4a791e0471f41c13 (diff) | |
download | gcc-5559bdc86635b2ff6cbaa60e933a7989ff212e1f.zip gcc-5559bdc86635b2ff6cbaa60e933a7989ff212e1f.tar.gz gcc-5559bdc86635b2ff6cbaa60e933a7989ff212e1f.tar.bz2 |
Emit loop initializer for repeat arrays
This commit changes how arrays of repeating elements, e.g. [5; 12] are
compiled. Rather than create a constructor which explicitly initializes
each element to the given value (which causes compiler OOM for large
arrays), we emit instructions to allocate the array then initialize the
elements in a loop.
However, we can only take this approach outside of const contexts -
const arrays must still use the old approach.
Diffstat (limited to 'gcc/rust/backend/rust-mangle.cc')
0 files changed, 0 insertions, 0 deletions