public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/102147] New: IRA dependent on 32-bit vs 64-bit register size
@ 2021-08-31 15:13 dje at gcc dot gnu.org
  2021-08-31 15:16 ` [Bug rtl-optimization/102147] " dje at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dje at gcc dot gnu.org @ 2021-08-31 15:13 UTC (permalink / raw)
  To: gcc-bugs

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?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-10-12  4:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 15:13 [Bug rtl-optimization/102147] New: IRA dependent on 32-bit vs 64-bit register size dje at gcc dot gnu.org
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

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).