]> gcc.gnu.org Git - gcc.git/commit
Fix reverse scalar storage order issues in IPA-SRA
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 14 Jan 2022 18:49:21 +0000 (19:49 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 14 Jan 2022 18:53:04 +0000 (19:53 +0100)
commitc76b3bc55b4603d38cc948f4076264af5c0b95aa
treeb33fbef0a608638c445184716d20616b41ed26f8
parent79ae13067f6afabcbae4784ada07dcbb7f00953e
Fix reverse scalar storage order issues in IPA-SRA

The IPA-SRA pass introduced in GCC 10 does not always play nice with the
reverse scalar storage order that can be used in structures/records/unions.
Reading the code, the pass apparently correctly detects it but fails to
propagate the information to the rewriting phase in some cases and, in
particular, does not stream it for LTO.

gcc/
* ipa-param-manipulation.c (ipa_dump_adjusted_parameters): Dump
reverse flag as "reverse" for the sake of consistency.
* ipa-sra.c: Fix copyright year.
(ipa_sra_function_summaries::duplicate): Copy the reverse flag.
(dump_isra_access): Tweak dump line.
(isra_write_node_summary): Write the reverse flag.
(isra_read_node_info): Read it.
(pull_accesses_from_callee): Test its consistency and copy it.

gcc/testsuite/
* gnat.dg/lto25.adb: New test.
* gnat.dg/opt96.adb: Likewise.
* gnat.dg/opt96_pkg.ads, gnat.dg/opt96_pkg.adb: New helper.
gcc/ipa-param-manipulation.c
gcc/ipa-sra.c
gcc/testsuite/gnat.dg/lto25.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt96.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt96_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt96_pkg.ads [new file with mode: 0644]
This page took 0.060549 seconds and 5 git commands to generate.