From: Zdenek Dvorak <rakdver@kam.mff.cuni.cz>
To: gcc-patches@gcc.gnu.org
Subject: [patch] Preserve exit phis only in lcSSA form
Date: Tue, 24 Jul 2007 23:54:00 -0000 [thread overview]
Message-ID: <20070724233944.GA29854@kam.mff.cuni.cz> (raw)
Hello,
in order to preserve loop closed ssa form, we avoid removing phi nodes
from exit edges of loops in tree_merge_blocks. However, we do this
whenever the information about loops is available, regardless of whether
we actually maintain lcSSA or not. This patch makes us protect loop
exit phi nodes only if we are in lcSSA.
Bootstrapped & regtested on ia64.
Zdenek
* tree-cfg.c (tree_merge_blocks): Preserve loop exit phi nodes only
in loop closed ssa.
Index: tree-cfg.c
===================================================================
*** tree-cfg.c (revision 126869)
--- tree-cfg.c (working copy)
*************** tree_merge_blocks (basic_block a, basic_
*** 1275,1283 ****
tree copy;
bool may_replace_uses = may_propagate_copy (def, use);
! /* In case we have loops to care about, do not propagate arguments of
! loop closed ssa phi nodes. */
if (current_loops
&& is_gimple_reg (def)
&& TREE_CODE (use) == SSA_NAME
&& a->loop_father != b->loop_father)
--- 1280,1289 ----
tree copy;
bool may_replace_uses = may_propagate_copy (def, use);
! /* In case we maintain loop closed ssa form, do not propagate arguments
! of loop exit phi nodes. */
if (current_loops
+ && (current_loops->state & LOOP_CLOSED_SSA)
&& is_gimple_reg (def)
&& TREE_CODE (use) == SSA_NAME
&& a->loop_father != b->loop_father)
next reply other threads:[~2007-07-24 23:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 23:54 Zdenek Dvorak [this message]
2007-07-31 13:07 ` Diego Novillo
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=20070724233944.GA29854@kam.mff.cuni.cz \
--to=rakdver@kam.mff.cuni.cz \
--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).