This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] support to flip modes in sh mode-switching
- From: Joern Rennecke <amylaar at spamcop dot net>
- To: Christian BRUEL <christian dot bruel at st dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 22 Dec 2006 13:30:30 -0500
- Subject: Re: [PATCH] support to flip modes in sh mode-switching
In http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01562.html, you wrote:
> Reminder: This patch adds support in the mode-switching pass to switch modes
instead of setting them. That implies that we need to track for every basic
blocks that need a mode setting (see EMIT_MODE_SET) the mode values of the
incoming edges when 'avin' is set. When 'avin' is not set a regular mode
setting sequence must be emitted.
No, please read the PR more carefully.
The normal case is that for every edge that needs a mode setting, we track
if avout of the source block is set.
avin is only interesting for exception handler blocks.
> The improvements for this new patch came after I realized that I didn't have
to carry any mode information on edges.
That is nonsense. multiple incoming edges can have different available modes.
That can actually be expected to happen relatively frequently for the edges
going into the first BB of a loop.
If you use the avout from the edge sources, you can optimize these loops;
if you ignore modes on edges, you can't.
> LCL guaranties that a mode will never been reset to the same value it was in
avin (why would it do that if the value is available ?). Furthermore, mode
values are exclusives. I've added a assertion to check this.
exception handlers have to hide their anticipatable mode to LCM, thus you have
to expect this to happen.