public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dje at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/102147] New: IRA dependent on 32-bit vs 64-bit register size Date: Tue, 31 Aug 2021 15:13:21 +0000 [thread overview] Message-ID: <bug-102147-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102147 Bug ID: 102147 Summary: IRA dependent on 32-bit vs 64-bit register size Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dje at gcc dot gnu.org Target Milestone: --- IRA heuristics chooses different data structure encodings based on the register size, and this produces different register allocation results. This was discovered by a GCC bootstrap comparison failure of tree-vect-slp.c when using a 32 bit compiler to bootstrap a 64 bit compiler. A difference occurs in ira-conflicts.c: build_object_conflicts(), for the same object with the same properties (i.e., min, max and px are the same), the function ira_conflict_vector_profitable_p() will return 1 by stage1-gcc and 0 by stage2-gcc. stage1-gcc: build_object_conflict obj140(a140) px=4 min=3 max=139 profitable_p=1 stage2-gcc: build_object_conflict obj140(a140) px=4 min=3 max=139 profitable_p=0 That's because the size of ira_object_t being a pointer is different in stage1-gcc (which is 32bit) and stage2-gcc (which is 64bit). My colleagues at ATOS and I aren't completely certain how this difference causes different conflict / allocation behavior because it seems that it should be an optimization. Should the data structure choice / algorithm choice depend on pointer size? Are the two algorithms supposed to generate the same results?
next reply other threads:[~2021-08-31 15:13 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-31 15:13 dje at gcc dot gnu.org [this message] 2021-08-31 15:16 ` [Bug rtl-optimization/102147] " dje at gcc dot gnu.org 2021-08-31 15:24 ` dje at gcc dot gnu.org 2021-09-01 8:34 ` [Bug rtl-optimization/102147] IRA dependent on 32-bit vs 64-bit pointer size rguenth at gcc dot gnu.org 2021-09-01 8:36 ` rguenth at gcc dot gnu.org 2021-09-01 13:52 ` dje at gcc dot gnu.org 2021-09-01 14:21 ` vmakarov at gcc dot gnu.org 2021-09-22 18:11 ` vmakarov at gcc dot gnu.org 2021-09-24 15:15 ` cvs-commit at gcc dot gnu.org 2023-10-12 4:17 ` bergner at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102147-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).