summaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>2025-11-18 12:57:24 -0800
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>2025-11-19 09:14:05 -0800
commit47ebad54abc127934693e7ace75a3cb08d6bc36c (patch)
tree07b4e80d9de59805893ed46853fee3411244c84b /libjava/java
parentc8eb7d8dbb9ff4eb13f476b16f8f58103cace64e (diff)
libstdc++: store the length after the store of the null character
This improves the code generation slightly for std::string because of aliasing. In many cases the length will be read again and the store of the null character will cause the length to be re-read due to aliasing requirements of the char type. So swapping around the stores will allow the length not to have to be reloaded from memory and will allow for more optimizations. Bootstrapped and tested on x86_64-linux-gnu. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (basic_string::M_set_length): Swap around the order of traits_type::assign and _M_length so that _M_length is at the end. Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions