public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ivopts: Fix candidate selection for architectures with limited addressing modes.
@ 2022-10-21 13:52 Dimitrije Milosevic
  2022-10-21 13:52 ` [PATCH 1/2] ivopts: Revert computation of address cost complexity Dimitrije Milosevic
  2022-10-21 13:52 ` [PATCH 2/2] ivopts: Consider number of invariants when calculating register pressure Dimitrije Milosevic
  0 siblings, 2 replies; 21+ messages in thread
From: Dimitrije Milosevic @ 2022-10-21 13:52 UTC (permalink / raw)
  To: gcc-patches; +Cc: djordje.todorovic

Architectures like Mips are very limited when it comes to addressing modes. Therefore, the expected
behavior would be that, for the BASE + OFFSET addressing mode, complexity is lower, while, for more
complex addressing modes (e.g. BASE + INDEX << SCALE), which are not supported, complexity is
higher. Currently, the complexity calculation algorithm bails out if BASE + INDEX addressing mode
is not supported by the target architecture, resuling in 0-complexities for all candidates, which
leads to non-optimal candidate selection, especially in scenarios where there are multiple nested
loops.

Additionally, when bumping up the register pressure cost, the number of invariants should also be
considered, in addition to the number of candidates.

Dimitrije Milosevic (2):
  ivopts: Revert computation of address cost complexity.
  ivopts: Consider number of invariants when calculating register pressure.

 gcc/tree-ssa-address.cc     |   2 +-
 gcc/tree-ssa-address.h      |   2 +
 gcc/tree-ssa-loop-ivopts.cc | 220 +++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 210 insertions(+), 14 deletions(-)
---
2.25.1



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

end of thread, other threads:[~2022-12-16 11:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 13:52 [PATCH 0/2] ivopts: Fix candidate selection for architectures with limited addressing modes Dimitrije Milosevic
2022-10-21 13:52 ` [PATCH 1/2] ivopts: Revert computation of address cost complexity Dimitrije Milosevic
2022-10-25 11:08   ` Richard Biener
2022-10-25 13:00     ` Dimitrije Milosevic
2022-10-27 23:02   ` Jeff Law
2022-10-28  6:43     ` Dimitrije Milosevic
2022-10-28  7:00       ` Richard Biener
2022-10-28 13:39         ` Dimitrije Milosevic
2022-11-01 18:46         ` Jeff Law
2022-11-02  8:40           ` Dimitrije Milosevic
2022-11-07 13:35             ` Richard Biener
2022-12-15 15:26               ` Dimitrije Milosevic
2022-12-16  9:58                 ` Richard Biener
2022-12-16 11:37                   ` Dimitrije Milosevic
2022-12-16 11:58                     ` Richard Biener
2022-10-21 13:52 ` [PATCH 2/2] ivopts: Consider number of invariants when calculating register pressure Dimitrije Milosevic
2022-10-25 11:07   ` Richard Biener
2022-10-25 13:00     ` Dimitrije Milosevic
2022-10-28  7:38       ` Richard Biener
2022-10-28 13:39         ` Dimitrije Milosevic
2022-11-07 12:56           ` Richard Biener

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