From: Vladimir Makarov <vmakarov@redhat.com>
To: Bernd Schmidt <bschmidt@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Fix (work around) LRA infinite loop, PR78911
Date: Fri, 03 Mar 2017 16:57:00 -0000 [thread overview]
Message-ID: <dd58f549-a6f8-b10e-30c8-7b090a070f73@redhat.com> (raw)
In-Reply-To: <d4e4ffd3-4013-81af-27b6-44c1c4fe5a37@redhat.com>
On 03/03/2017 08:36 AM, Bernd Schmidt wrote:
>
> Reload is designed in a way to avoid cycles and to process all reloads
> for an insn in order of ascending class so as to avoid this kind of
> issue. With LRA I'm really not sure how to fix this properly, but the
> following patch seems to cure the PR at least, by recognizing when
> we're about to spill a reload reg whose assigned class contains only
> contains a single register.
>
I had conversations with several people who worked on different RAs and
got a conclusion that looping is a pretty general problem in iterative
classical RAs. Unfortunately, it is not discussed in a literature and
ad-hoc approaches are used (that is why it is probably not discussed in
scientific literature).
On first stages of LRA development, looping was a very frequent bug and
also add-hoc approaches were used to fix it. The major way is to
predict that given decision can result in repeating patterns and to
avoid such decision (e.g. lra_constraints.c::process_alt_operands
contains code).
Reasons for looping can have different nature and now I have no
systematic solution on my mind to avoid all of them.
> Bootstrapped and tested on x86_64-linux, ok?
>
>
Yes. Thank you for working on this, Bernd. The issue mentioned in
FIXME part of the comment can be addressed later if we have cases for
which your fix will be not enough.
prev parent reply other threads:[~2017-03-03 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 13:36 Bernd Schmidt
2017-03-03 16:57 ` Vladimir Makarov [this message]
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=dd58f549-a6f8-b10e-30c8-7b090a070f73@redhat.com \
--to=vmakarov@redhat.com \
--cc=bschmidt@redhat.com \
--cc=gcc-patches@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: link
Be 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).