diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-11-11 17:28:56 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-11-11 17:28:56 +0000 |
commit | 5afd208beaef50bcc43b556d4c41d41656b06436 (patch) | |
tree | 5f28017b7a4ae55966a15435a47592d11099caf0 /gcc/gimple-range-cache.cc | |
parent | 174ee5115a3004d3664165e9d619535b579111d4 (diff) | |
download | gcc-5afd208beaef50bcc43b556d4c41d41656b06436.zip gcc-5afd208beaef50bcc43b556d4c41d41656b06436.tar.gz gcc-5afd208beaef50bcc43b556d4c41d41656b06436.tar.bz2 |
mode-switching: Fix the mode passed to the emit hook
optimize_mode_switching passes an entity's current mode (if known)
to the emit hook. However, the mode that it passed ignored the
effect of the after hook. Instead, the mode for the first emit
call in a block was taken from the incoming mode, whereas the
mode for each subsequent emit call was taken from the result
of the previous call.
The previous pass through the insns already calculated the
correct mode, so this patch records it in the seginfo structure.
(There was a 32-bit hole on 64-bit hosts, so this doesn't increase
the size of the structure for them.)
gcc/
* mode-switching.cc (seginfo): Add a prev_mode field.
(new_seginfo): Take and initialize the prev_mode.
(optimize_mode_switching): Update calls accordingly.
Use the recorded modes during the emit phase, rather than
computing one on the fly.
Diffstat (limited to 'gcc/gimple-range-cache.cc')
0 files changed, 0 insertions, 0 deletions