This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SFN] Bootstrap broken
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, Jeffrey Law <law at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 14 Dec 2017 09:04:03 -0200
- Subject: Re: [SFN] Bootstrap broken
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvny=4dmX11q5dBvy2SpAtRZYBygpb87JOwpzBZN6WS_qhDQ@mail.gmail.com> <orvahb6qle.fsf@lxoliva.fsfla.org> <20171213092822.GE2353@tucnak>
Jakub, I summed up to you yesterday on IRC what I expand below; this is
just for the public record.
On Dec 13, 2017, Jakub Jelinek <jakub@redhat.com> wrote:
> Furthermore, I must say I don't understand why
> can_move_early_debug_stmts should care whether there are any labels in
> dest bb or not.
An earlier attempt tried to move all labels and debug stmts in a single
loop, and started with this early debug setting and inserting at the
block start stmt, and later switched to the preexisting debug setting
and inserting at the after-label stmt. In the end, I decided this was
trickier and riskier than two separate loops, but failed to simplify the
logic back all the way.
> Though, if
> gsi_stmt (gsi) == gsi_stmt (gsie), then the loop right below it will not
> do anything and nothing cares about can_move_early_debug_stmts afterwards.
> So, in short, can_move_early_debug_stmts is used only if
> gsi_stmt (gsi) != gsi_stmt (gsie), and therefore
> can_move_early_debug_stmts if it is used is can_move_debug_stmts && (1 || ...);
*nod*
> So, can we get rid of can_move_early_debug_stmts altogether and just use
> can_move_debug_stmts in there instead?
Yes.
> Another thing I find risky is that you compute gsie_to so early and don't
> update it.
The point of computing it early was *precisely* to preserve the
insertion point should we have both before-label and after-label debug
stmts to move. But in the end it doesn't matter: we'll either find the
right spot after moving labels, or we'll be at it if there weren't any
labels to move.
Thanks for the improvements!
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer